Stuff I learned in today's code review
Here's something I learned or have my memory refreshed during today's code review:
- use of internal as in "internal const int a; "
- static constructor
- using keyword. You can even use it as alias. Of course most of the time you use it as statement.
- Obsolete attribute
- Predicate delegate. Example is here.
- Enum.Parse
- Enum can have base other than int
- PreRender seems to be a better place to put final UI code (like popup windows) than LoadComplete .
- Best Practice: To test authorization, some suggest using a collection of security attribute stored in base class, while the others think that using overriding method seems better because it force developer to write all the corresponding test, or else the code won't even compiled.
- learn to use IsNullOrEmpty
- The as keyword in C#
- The difference of out and ref in C#, and why do we have both of them. And the implication of passing array using out or ref.
0 Comments:
Post a Comment
<< Home