Define a console application to display all the arguments passed to command line while running the application. The user can pass any number of arguments that should be displayed. Use length property of array and for-next loop. If there are no arguments in command line display message ‘No Arguments’
1
Expert's answer
2011-06-01T13:09:16-0400
using System;
namespace cmndl { class Program { static void Main(string[] args) { if (args.Length == 0) { Console.WriteLine("No Arguments"); } else { Console.WriteLine("List of command line arguments:"); for (int i = 0; i < args.Length; i++) { Console.WriteLine("{0}. {1}", i+1, args[i]); }; };
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment