c# - Why can I not set a Func to return a parameter type to an integer value? -
If the function returns the compensation, then I only return one type of return type to the last parameter function < .... in the parameter list ....
Q: Why can not I set the function to return type? Or am I using the variable return result which is declared as above? Neither do the work. Code: or - Why can not I set the function back to? Because a function that returns a In both instances, you have not given any value for input, so there is no one to get back the value is not until you provide inputs and evaluate the function You get a meaningful result. Your second example works well, but you have to provide input and capture the output:
int tempValueResult = Func & lt; int, int, int, int, int, int, int & gt; MyMeth6 = (a, b, c, y, e, returnResult) = & gt; {Console.WriteLine (a + b + c + y + e); Return (A); }; Console.WriteLine (returnResult);
complete return result = 0; Function & lt; int, int, int, int, int, int, int & gt; MyMeth6 = (a, b, c, y, e, returnResult) = & gt; {Console.WriteLine (a + b + c + y + e); Return (A); };
int is the function , not a
int . The specific input given is the result is a
int of that function.
returnResult = myMeth6 (1, 2, 3, 4, 5) );
Comments
Post a Comment