标签:
C# does not support static local variables (variables that are declared in method scope).
public static class MyStaticClass : MyClass // error CS0713: Static classes must derive from object. { static MyStaticClass() { Console.WriteLine("MyStaticClass constructor"); } public static void Test() { Console.WriteLine("MyStaticClass:Test"); } } public class Derived : MyStaticClass { } //'Derived': cannot derive from static class 'MyStaticClass'
标签:
原文地址:http://www.cnblogs.com/gcczhongduan/p/5351438.html