The Most Common a variable or a value listed in a call to a method is called Debate Isn’t as Black and White as You Might Think
The “value” of a method, when called, has the same meaning as a variable.
If a variable or method is declared to have a value and only a value, it is called a “variable”. If a variable or method has a value and is declared as having a different type, this is called a “dynamic variable”.
A var is a variable or variable type. A var is a value type.
A var can also be a type of variable. So you can declare a var as a string and have it be a string type, or you can declare a var as an int and have it be an int type, or you can declare a var as a float and have it be a float type. It is just as valid to declare a var as a string and a float.
A value var is a value type like a String, a float, or an int. If a value var has a value then it is called a value type. It is just as valid to declare a value var as a string, a float, or an int. This doesn’t mean you can make a variable that is both a value var and a string, but it does mean you can do this very thing.
So when a developer writes a method in C# that accepts a variable, it has to be a variable type. It is still valid to say, “a method will receive a string, a float, or an int.” However, because that method may want to return some other data, it can be written such that it accepts a value var instead of a string, a float, or an int.
It’s actually pretty simple to write a method that accepts a value var and returns some data.
In the case of the method above, it was a method that took a string and a float and returned a float. That’s the simplest way to do this, but the compiler has to be able to handle both cases. The first case is what the user would expect. Our method would have returned some float.
I believe the first case in the above example should be called a return statement, but since I said it should be simple, I didn’t actually do that. The second case is what the user would expect.
The second case is called an expression.