+ 2

What does "args" mean in c#/java "Main" function?

17th Aug 2018, 11:06 AM
XXxx_GETREKT_xxXX
XXxx_GETREKT_xxXX - avatar
4 odpowiedzi
+ 2
it is a variable like any other method variable that accepts arguments from the os console to pass to the program.
17th Aug 2018, 11:13 AM
StealthyTaco
StealthyTaco - avatar
+ 3
XXxx_GETREKT_xxXX while im not sure if thats the correct syntax of the call, yes that is what would occur.
17th Aug 2018, 12:10 PM
StealthyTaco
StealthyTaco - avatar
+ 1
Yes, and probably c:\program\prog.exe too.
17th Aug 2018, 11:36 AM
Vlad Serbu
Vlad Serbu - avatar
0
so, if i'd call the program like ""c:\program\prog.exe" a b c", the "args" would contain {"a","b","c"}?
17th Aug 2018, 11:28 AM
XXxx_GETREKT_xxXX
XXxx_GETREKT_xxXX - avatar