O'Reilly logo

Effective C# (Covers C# 4.0): 50 Specific Ways to Improve Your C#, Second Edition by Bill Wagner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Miscellaneous

Some items don’t fit convenient categories. But that does not limit their importance. Understanding exception-handling strategies is important for everyone. Other recommendations are constantly changing because C# is a living language, with an active community and an evolving standard. Still others may feel outdated, and yet still resonate today. This chapter contains those items that just don’t fit easy categories.

Item 45: Minimize Boxing and Unboxing

Value types are containers for data. They are not polymorphic types. On the other hand, the .NET Framework was designed with a single reference type, System.Object, at the root of the entire object hierarchy. These two goals are at odds. The .NET Framework uses boxing and unboxing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required