Thursday, December 30, 2010

C# Snippets - Display Console application parameters

The other day while working with a console application, we had to log all the parameters passed on to the  application. Here is a single line code to fetch all parameters passed onto the application.


Console.WriteLine(String.Join(", ",Environment.GetCommandLineArgs()));

No comments: