C#入口点 [英] C# Entry Point

查看:145
本文介绍了C#入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道C#控制台应用程序需要Main()的入口点,而Main()可以返回整数或什么都没有。我的问题是,人们通常在这种方法中投入了什么?我知道该方法是必需的,否则编译器将不知道从哪里开始,但它似乎是一种浪费。例如,我正在处理EDI的一部分,第一个任务是将目录的内容读入数组,但这似乎不适合Main()方法。我意识到这可能只是我的经验不足,但任何输入都会非常感激。谢谢。

I understand that C# console applications need an entry point of Main(), and that Main() can return and integer or nothing. My question is, what do people typically put in this method? I understand that the method is needed otherwise the compiler will not know where to start, but it kind of seems like a waste. For instance, I am working on part of an EDI and the first task is to read the contents of a directory into an array, but this does not seem appropriate for the Main() method. I realize this is probably just my inexperience asking, but any input would be greatly appreciated. Thanks.

推荐答案

你可以用它来实现你需要的任何类,设置和目录结构等。

Al虽然一般它会是更像是
You can use it to instanciate any classes you need, setup and directory structures etc.
Al though generally it would be more like
展开 | 选择 | Wrap | 行号



您可以使用它来实例化任何类需要,设置和目录结构等。

Al虽然通常更像是
You can use it to instanciate any classes you need, setup and directory structures etc.
Al though generally it would be more like
< span class =codeLinkonclick =Bl ur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号



您可以使用它来实现您需要的任何类,设置和目录结构等。

Al虽然通常更像是
You can use it to instanciate any classes you need, setup and directory structures etc.
Al though generally it would be more like
展开 | 选择 | Wrap | 行号


这篇关于C#入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆