Tips and Tricks for Building Components in C#

Submit New Article

May 6, 2008 9:00 PM PDT


Objective
by John Sharp
Content Master Ltd

C# is the language of choice for many developers building components designed to operate in the .NET* Framework. The purpose of this technology brief is to document the top 10 tricks and tips that I have found useful when building components and applications with C#.
Technology Overview
C# is just one of many languages that you can use to build components for .NET. To help you interact with the environment, Microsoft supplies the .NET Framework Class Library, which is a comprehensive set of namespaces, classes, and types useful for building fully functional applications. Namespaces are available containing classes acting as wrappers for most aspects of the Windows* operating system, as well as providing an interface to the execution system used to run .NET applications—the Common Language Runtime (CLR). To make the best use of C#, you should understand a little about how the CLR works and how you can use the .NET Framework Class Library to build efficient, scalable components.

All of the tips and tricks shown here are presented using C#. However, the nature of the CLR and the .NET Framework Class Library is such that many of them are equally applicable when using other languages, such as Visual Basic .NET* or J#*.