How to get command line arguments for windows application in c#

/ Published in: C#
Save to your folder(s)

It can use this in any place of its application, not only main () like in an application of console is limited its use in the method.

Copy this code and paste it in your HTML
  1. string[] args = Environment.GetCommandLineArgs();
  3. foreach(string arg in args){
  4. // Your Things
  5. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.