Here are some of programming best practise, a quick reference.
For Events
Consider placing the code where the event is raised in a try-catch block to prevent program termination due to unhandled exceptions thrown from the event handlers.
For Fields
1) Do not use public field, rather declare private field, and expose them through properties.
2) Use constant fields for fields which are not going to change.
For more details visit
http://msdn.microsoft.com/en-us/library/ms229042.aspx
No comments:
Post a Comment