Error del compilador CS0673

Actualización: noviembre 2007

Mensaje de error

System.Void no se puede utilizar en C#; utilice typeof(void) para obtener el objeto de tipo void.
System.Void cannot be used from C# -- use typeof(void) to get the void type object.

System.Void no puede usarse en C#.

El código siguiente genera el error CS0673:

// CS0673.cs
class MyClass
{
   public static void Main()
   {
      System.Type t = typeof(System.Void);   // CS0673
      // try the following line instead
      // System.Type t = typeof(void);
   }
}