Method == FunctionName + ValueTuple #8070
Replies: 5 comments 5 replies
-
While multiple parameters are equivalent to tuples in functional perspective, they can be different in calling convention and ABI perspective. In type system of C#, parameters are also more representable when it comes to |
Beta Was this translation helpful? Give feedback.
-
Duplicate of #4599? |
Beta Was this translation helpful? Give feedback.
-
I don't know what this is asking for at a language level. |
Beta Was this translation helpful? Give feedback.
-
This is means that: We can use a method(name) as delegate. and use a tuple as a method parameters. |
Beta Was this translation helpful? Give feedback.
-
Here is the relevant content. And we can use tuple like 'property value' or 'app parameter'. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
A method can be decomposed into two parts:
As shown above, function name is 'CalcArea', and value tuple is '(double, double)'.
We can express it as a stream function:
As shown above, we prepare a tuple value, invoke a func, finally assign a value to variable a.
Better use in streaming functions
As shown above:
Beta Was this translation helpful? Give feedback.
All reactions