I have a C++/CLI WinForms project and in which I can happily print out the command line arguments in main using the following code
int main(array<System::String ^> ^args)
{
for each(String^ arg in args) {
System::Diagnostics::Debug::WriteLine(arg);
}
}
Is there a built in function that allows me to access these arguments again during the program or do I need to save them myself?
I've seen this question, specifically the second answer that says you can do this in C#:
string[] args = Environment.GetCommandLineArgs();
But is there a way specifically in C++/CLI?