【发布时间】:2011-06-27 14:36:33
【问题描述】:
嗨,我在一个类中有一个 static 方法,在我的控制台应用程序中,我像这样使用
Console.writeLine("Some thing Some thing");
Console.writeLine("Some thing Some thing");
String X=ClassName.Method(Para); <--- Check here
Console.writeLine("Some thing after some thing ");
Console.writeLine("Some thing after some thing ");
我的问题是在执行静态方法之后的代码在获得statc方法的返回值之后没有被执行,应用程序就像停止了..如何克服这个问题?
【问题讨论】:
-
这不是正常行为。请给我们更多代码
-
“好像停止了”是什么意思?
-
你尝试过 try/catch 还是调试和单步进入静态函数?
-
不要向我们展示伪代码,而是向我们展示调用您的静态方法的真实代码以及静态方法本身。
-
String X=ClassName.Method(Para);是做什么的?