I don´t get a help - Output into my cmd.
Based on my last question ( How to integrate c# help into console application ) I want integrate a help function into my c# written application.
I already integrated the help function code but i think that ist not completly.
Here my code:
namespace Application1
{
static class Program
{
// Implementation
static bool ShowHelpRequired(IEnumerable<string> args) // help function II
{
return args.Select(s => s.ToLowerInvariant())
.Intersect(new[] { "help", "/?", "--help", "-help", "-h" }).Any();
}
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
if (ShowHelpRequired(args))
{
Console.WriteLine("Show help message here");
}
}
}
}
Could someone give me a example how to get an(help) Output into my cmd?
My Case: Actually if i call my "GUI.exe" into the cmd with -> "GUI.exe -h", then only my "GUI.exe" will be started.
My Goal:
If i cmd and enter -> "GUI.exe -h" then the it should Comes an Output with help information about my GUI.exe
It would be great if someone could Support my to reach my Goal.
In Advance thank you very much.