复制代码 代码如下:
//定义静态方法
class SQLHelper
{
public static string aaa()
{
return “你好"
}
}
调用:
SQLHelper.aaa(); // 类名.方法名
//定义动态方法
class SQLHelper
{
public string aaa()
{
return “你好"
}
}
调用:
SQLHelper s =new SQLHelper ();
s.aaa();
查看更多关于asp.net 中静态方法和动态方法调用的区别实例分析的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did29063