New Features in C#

New Features in C# 2.0

by Bradley Jones

From the July 26th CodeGuru newsletter.

The C# language is standardized through ECMA International. This allows for a standardization of the language without the fear of one company controlling it. Said another way, C# is a non-proprietary language that no single company can control.

The ECMA committee has recently accepted two new specifications. These are the Standard ECMA-334: C# Language Specification and the Standard ECMA-335: Common Language Infrastructure (CLI) Specification. I took a quick look at these.

The acceptance of ECMA-334 is the approval of the third edition of the C# language. This standard specifies the syntax and constraints used to create a standard C# program. Additionally, it defines the semantic rules for interpreting C# programs and the restrictions and limits that must be met to be considered a conforming version of C#.

More specifically, what does this mean to a C# developer? It means that a number of new features can be used with confidence because future C# compilers will be supporting them. These features include:

  • Pragma directives
  • Anonymous methods
  • Static classes
  • Partial declarations (article)
  • Property get and set accessors
  • Generic types and methods (article)
  • Iterators
  • Nullable types

With the changes that have been made to the C# language, it is also not surprising that changes also needed to be made within the standardized CLI specification. Changes in the CLI based on ECMA-335 are:

  • Support for generic types and methods.
  • Additional prefixes of constrained., no., and readonly.
  • Additional instructions of Idelem, stelem, and unbox.any.
  • Added a number of members and types to the Type library.
  • Made changes to the specification including the addition of a "Debug Interchange Format" section.

In the CLI, there are numerous types and members that were added to the type library. These include a number of generics in the System namespace ranging from Action<T> to TypedReference. The System.Collections.Generics namespace was also added along with numerous types within it. The System.Reflection namespace was updated to allow for support of generics reflection as well to include new enumeration values to support non-standard encoding of String formatting attributes. The System.Runtime.CompilerServices namespace was updated to include types CompilationRelaxations and CompilationRelaxationsAttribute. Finally, the System.Threading.Parallel namespace now contains a number of new types for supporting multithreaded CPUs.

As you can see, C# and the .NET Framework are evolving. These new additions help to boost C# into being an even more powerful, non-proprietary, standardized language. Although Microsoft may be initiating the changes, it is good to know that a standards board is controlling the language. In my opinion, this gives C# developers some added protection as the C# language continues to evolve.

# # #

About the Author

Bradley Jones

Bradley Jones, in addition to managing CodeGuru, Brad! oversees the Newtwork of sites including Codeguru,, DevX, VBForums, and over a dozen more with a focus on software development and database technologies. His experience includes development in C, C++, VB, some Java, C#, ASP, COBOL, and more as well as having been a developer, consultant, analyst, lead, and much more. His recent books include Teach Yourself the C# Language in 21 Days, Web 2.0 Heroes, and Windows Live Essentials and Services.
Google+ Profile | Linked-In Profile | Facebook Page


  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Learn How A Global Entertainment Company Saw a 448% ROI Every business today uses software to manage systems, deliver products, and empower employees to do their jobs. But software inevitably breaks, and when it does, businesses lose money -- in the form of dissatisfied customers, missed SLAs or lost productivity. PagerDuty, an operations performance platform, solves this problem by helping operations engineers and developers more effectively manage and resolve incidents across a company's global operations. …

  • Live Event Date: December 18, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT The Internet of Things (IoT) incorporates physical devices into business processes using predictive analytics. While it relies heavily on existing Internet technologies, it differs by including physical devices, specialized protocols, physical analytics, and a unique partner network. To capture the real business value of IoT, the industry must move beyond customized projects to general patterns and platforms. Check out this upcoming webcast …

Most Popular Programming Stories

More for Developers

RSS Feeds