+ 2
[DUPLICATE] Not understand (string [] args)
can someone explain what is the meaning of (string [] args)
5 Answers
+ 6
I believe it's used when a console program is run from a commandline. If you give additional info with the command, the args array will hold those arguments as strings. A program that uses this will parse them out.
+ 2
Like @tamra mentioned its used when a user compiles your program from the command line and can pass in some data that your program could need to execute successfuly. So the "string[] args " is basically an array of strings so essentially when the user passes the data in from command line or terminal, that data is then stored within the array as all type strings. It is then upto you to convert that data if you dont want the type strings to the appropriate type.
0
an array of strings, assuming string is a predefined object. it usually comes with the size argument. int func(string [] args, int size)
0
that's not specific to command line args, that can be housed in any function
0
@elio no one said its specific to command line . Majority of the time that is what its used for.



