Parameters and arguments.
-
These are arguments: static void Main(string[] args) {}. Inside a class a function is a method and not a function. But I see often that those arguments are called parameters. Why? We call a method with parameters and not with arguments. Inside the method parameters become arguments, Isn't that true?
-
These are arguments: static void Main(string[] args) {}. Inside a class a function is a method and not a function. But I see often that those arguments are called parameters. Why? We call a method with parameters and not with arguments. Inside the method parameters become arguments, Isn't that true?
Quote:
When a parameter is passed to the method, it is called an argument.
[C# Method Parameters](https://www.w3schools.com/cs/cs\_method\_parameters.asp)
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
-
Quote:
When a parameter is passed to the method, it is called an argument.
[C# Method Parameters](https://www.w3schools.com/cs/cs\_method\_parameters.asp)
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
I had to look it up for C++ to discover that it uses the same terminology. I've often used them interchangeably and wasn't sure if there was actually a distinction. So thanks for teaching me something today.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing. -
I had to look it up for C++ to discover that it uses the same terminology. I've often used them interchangeably and wasn't sure if there was actually a distinction. So thanks for teaching me something today.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing. -
These are arguments: static void Main(string[] args) {}. Inside a class a function is a method and not a function. But I see often that those arguments are called parameters. Why? We call a method with parameters and not with arguments. Inside the method parameters become arguments, Isn't that true?
The variables defined in the method (A.K.A. function) signature, are known as parameters of the method, the data passed to those variables when call upon are the arguments... Difference Between Argument and Parameter | Compare the Difference Between Similar Terms[^] In the static Main method we define a String array named args because when an app is generated, and after, executed with arguments, there it will be where those program arguments will be set into! :java: