.Net Coding Standards

The C#/.Net coding style that I recommend is documented in MSDN: MSDN’s “Design Guidelines for Developing Class Libraries”: http://msdn.microsoft.com/en-us/library/ms229042 MSDN’s “Guidelines for Names”: http://msdn.microsoft.com/en-us/library/ms229002 For more in-depth guidance, I consult Microsoft’s authoritative book, Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries. Although it’s a bit pricey, it also includes a DVD with several video … Read more.Net Coding Standards

Reduce Exception Handling Bloat

Most developers are probably familiar with exception handling guidelines that advise you to “avoid catching System.Exception or System.SystemException, except in top-level exception handlers”, and “if you can’t handle the exception in your part of the chain, throw it upwards rather than swallow it”. These spirit of these guidelines basically encourage you to: Create your own typed exceptions … Read moreReduce Exception Handling Bloat

Configuration for a WCF Client in a DLL

By default, WCF Web Service clients have their binding and endpoint configurations defined by their hosting EXE’s app.config–or web.config if your host is an IIS application. The DLL itself has no control over the config file: the app.config that is created in Visual Studio when you create a Web Service Reference is misleading–the system.serviceModel XML … Read moreConfiguration for a WCF Client in a DLL