Category: Blog

Declaring Generic Interfaces With C#

C# Generics Implementation With the C# generics implementation that is currently under proposal it will be possible to declare generic interfaces, not just generic classes.  This is really cool as it avoids the ambiguity associated with returning an object such as in the System.Collections.IEnumerable interface.  In place of the non-generic interface we would use the generic System.Collections.Generics.IEnumerable […]

Using @ to Disambiguate Keywords from Identifiers in C#

C# Language Specification While reading the C# Language Specification today I noticed the use of the @ sign to disambiguate a keyword from an identifier.  When you do this the identifier is called a verbatim identifier.  So, for example, you could write code as follows: class @class { static void Main() { @static(false); } public […]