在C#应用程序的命令行参数 [英] Command line arguments in C# application
本文介绍了在C#应用程序的命令行参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个WPF C#应用程序,而我必须通过命令行参数。这个论点实际上是一个URL,我必须再在我的应用程序中使用?
I have a WPF C# application, to which I have to pass command line argument. The argument is actually a URL, which I have to then use in my application?
如何在WPF C#中通过了这些命令行参数,以便应用程序能皮卡发射过程中的网址?
How are these command line arguments passed in WPF C#, so that the application can pickup the url during launch?
推荐答案
在您的App.xaml.cs
In your App.xaml.cs
class App : Application
{
//Add this method override
protected override void OnStartup(StartupEventArgs e)
{
//e.Args is the string[] of command line argruments
}
}
这篇关于在C#应用程序的命令行参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文