+ 1
C# argument, string and output
Hi! What are the [ ] and 'args' doing in the following lines of code?( I'm a begginer at programming and still learning from this app, I want to know how those 2 things are changing the code since the application didn't tell me {yet at least}) static void Main(string[], args) int = x x = 89 Console.writeline(x) // Outputs 89
5 ответов
+ 4
A lot of languages provide a method to receive command line arguments. Your program gets treated as a command, when you run it, and the values you enter, after it's mention, are given to the program via args. args is an array of strings.
+ 5
void indicates the return type that would not return any value,
static means :you can run the code without making an instance (object),
(your main method takes an argument of type string )
+ 1
Thanks!
0
sorry 🙏, In C. Sharp. Want to know how to do a prediction at the search. Is it helpful to (complete automatic)
0
sorry 🙏, In C. Sharp. Want to know how to do a prediction at the search. Is it helpful to (complete automatic)