c# - ASP.NET Delegates and Expressions -Information Request -
Based on my understanding, I interpret the meaning of funk representative as follows. Please correct them as and when necessary. / P>
Announcement: function & lt; Int & gt; DG;
1 Can I interpret it as "a representative who gives an integer?"
3. If both representatives and Lambda function are in the form of Pointer Where are you working? 4. If both the aforementioned structures are serving for the same purpose, where is the different place different from it? Announcement: function; L & gt; Int, int & gt; Delg1 = r = & gt; 2 * r; Can I define it as "R" which is a lambda expression, which is a parameter of an integer type that is called ' 2 * R is being evaluated and gives an integer. *
Comparison: Representative and Lambda Expression
Comparison: Are the following two announcements the same?
Announced 1: fx & lt; Int, int & gt; Fn = (r) = & gt; 45 * r; Announced 2: Expression & lt; Func & lt; Int, int & gt; Ex = (r) = & gt; R * 10;
1) Yes, but it would be more accurate and accurate to say "a representative one method Referring to someone who does not take argument and gives an integer ".
2) No "r" is not a lambda expression. "R" is used twice, the formal parameter of the declared body is not Lambda Expression "R => 2 * R"
3) Lambda and representative are different things Lambda is the essence of "Some works that a function" is the concept of a representative type is the essence of the type of those things. Whatever type Not to take and how to get back. A special representative is a reference to such a method is a lambda variable for a corresponding representative type, and if you do this, at runtime, you get a representative example. But a lambda is variable with other things like a convertible tree.
4) They do not serve the same purpose. The expression tree is an object that represents the computation mentioned in Lambda. Representative is an object that actually does the calculation described in Lambda.
Comments
Post a Comment