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 164 views
1 answer 169 views
1 answer 112 views
1 answer 159 views
1 answer 147 views
...