本文介绍了如何从静态main()调用方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有 Main 方法和功能的控制台应用程序.
I have a console application with a Main method and a function.
如何从 Main 方法进行函数调用?
How can I make a function call from the Main method?
我知道下面的代码不起作用
I know the code below won't work
static void Main(string[] args) { string btchid = GetCommandLine();// GetCommandline is a mthod which returns a string } 推荐答案还有
var p = new Program(); string btchid = p.GetCommandLine();更多推荐
如何从静态main()调用方法?
发布评论