.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
6.01.2005

 
C# 2.0 Generics
Looking at generics (aka template classes) in 2.0 beta, here are some differences between C# generics and C++ templates.

  • can't call arithmetic operators in a C# generic class. You CAN call user defined operators
  • C# does not support explicit or partial specialization (i.e. custom implementation for a specific type)
  • C# does not allow the type parameter to be used as the base class for the generic type (ala ATL)


Comments: Post a Comment

Powered by Blogger