在控制台应用程序main中我们怎么知道string [] args是可选的? [英] In console application main how do we know that string[] args is optional?
本文介绍了在控制台应用程序main中我们怎么知道string [] args是可选的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在控制台应用程序main中我们怎么知道string [] args是可选的?
因为在c#中我们写可选参数为
In console application main how do we know that string[] args is optional?
Because in c# we write optional parameter as
public static int Maintain(int Nar=1)
{
return 1;
}
string [] args如何是可选的?
how string[] args is optional?
推荐答案
Main
是应用程序的入口点,处理有特殊情况。 文档 [ ^ ]说明一切:
Main
is the entry point of the application and is handled has a special case. Documentation[^] say it all:
可以使用或不使用包含命令行参数的string []参数声明Main方法。
The Main method can be declared with or without a string[] parameter that contains command-line arguments.
这篇关于在控制台应用程序main中我们怎么知道string [] args是可选的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文