在C#中使用命令行运行方法 [英] rrun amethod using command line in c#

查看:88
本文介绍了在C#中使用命令行运行方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有我想使用命令行在c#中运行方法的人,任何人都可以帮帮我.

Hyy all i want to run a method in c# using command line , anybody can help me out please.

推荐答案

即使不清楚,但它看起来您需要根据命令行参数表示的用户请求来调用应用程序中编程的不同操作,这是很平常的事情.您只需要解析命令行并计算您的主要方法(入口点)要调用的内容.

我提供了一个非常全面的解决方案,在开发过程中特别容易获得支持.我将其发布为CodeProject文章:基于枚举的命令行实用程序 [
Even though it is not clear, but it looks like you need to invoke different actions programmed in your applications depending on the user''s request expressed by the command line parameters, which is a very usual thing. You just need to parse a command line and calculate what to call by your main method (entry point).

I offer one pretty much comprehensive solution which is very easy in development and especially support. I published it as a CodeProject article: Enumeration-based Command Line Utility[^].

The only other utility I recommend is references in my article, please see.

—SA


这篇关于在C#中使用命令行运行方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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