C# 一点东西

来源:互联网 发布:自动发广告软件 编辑:程序博客网 时间:2024/05/29 14:56

   静态方法中不能直接调用非静态的方法。

 such:

 

 

  public a()

{

 b();

}

 

public b()

{

}

the kind of writing is ok! but the following writing is worng!

 

public static a()

{

b();

}

public b()

{

}

//

we write in this way!

 

class test

{

public static a()

{

class test =new test();

test.b();

}

public b()

{

}

}

 

 

 

 

 

 

 

原创粉丝点击