c# - What is the different in the lambda expression from group1 and group2? -
What is the difference between group 1 and group 2 in the following syntax? I have started using these types of expressions and I think that is a representative and looks like a function (for the most part) and then I look at group 1 ( ). This is "Favorite" because it is small and easy to read In other words and In the linked MSDN page, there are other surcharges for the function & lt; & Gt; Take a different amount of that parameter, for example, a version that accepts 4 parameters. One of the best resources on the topic. It gives a nice history of delegates and syntax changes in each version of C #. = & gt; ) with this syntax and it is not certain that
Func & lt; & Gt; Only two arguments should be taken, but in group 1 example it takes three variables why is it?
Group 1 Action & lt; Bool & gt; print1 = q = & gt; Console.WriteLine (Q); & Lt; Integer & gt; printInt = q = & gt; Console.WriteLine (Q); Funk & lt; Double, double & gt; Class 1 = c = & gt; C * C; Funk & lt; Double, double, double & gt; Add1 = (x, y) = & gt; x + y; In the & lt; Double & gt; isLessThanTen1 = f = & gt; F & LT; 10; Group 2 function & lt; String, string & gt; Convert = delegate (strings) {returns s. Towapper (); }; Without the need for a representative, Group 1 is a rhythmic way to create a representative (
funk & lt; int, null & gt; == Action & lt; Int & gt;
Funk & lt; Int, bool & gt; == prediction & lt; Int & gt;
Comments
Post a Comment