How to display the number of command line arguments in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main(string[] args) {
        Console.Write(args.Length);
    }
}



/*
run:

2

*/

 



answered Apr 4, 2021 by avibootz

Related questions

1 answer 171 views
1 answer 180 views
1 answer 127 views
1 answer 168 views
1 answer 155 views
...