Sunday 28 December 2014

Generic

One of the benefits of generics is that more checking is done at compile time, so you're more likely to have working code when it all compiles, this makes the experimentation simpler.

Reference : C# in Depth, 3d Edition

Friday 26 December 2014

Validation

Ensure that you correctly handle validation errors, and avoid exposing sensitive
information in error messages. In addition, ensure that you log validation failures
to assist in the detection of malicious activity.

Reference : Microsoft Application Architecture Guide (Second Edition)

Thursday 25 December 2014

Exception Management

Differentiate between system exceptions and business errors. In the case of business errors, display a user friendly error message and allow the user to retry the operation.In the case of system exceptions, check to see if an issue such as a service or database failure caused the exception, display a user friendly error message, and log the error message to assist in troubleshooting.

Reference : Microsoft Application Architecture Guide (Second Edition)