更新:2007 年 11 月
错误消息
在 C# 中无法使用 System.Void - 使用 typeof(void) 获取 void 类型对象。
System.Void 不能用在 C# 中。
下面的示例生成 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);
}
}