- Implement type specific, overloaded versions of functions. So if a function is often called with a particular type of argument, then create specific version of the function that accepts that type of parameter. (Instead of just creating one version that selects an Object argument)
- Use generics when ever possible instead of accepting Object arguments.
- Override the ToString, Equals, and GetHash virtual members when defining structures.
Additional Resources
Boxing and Unboxing (David Cumps)
No comments:
Post a Comment