Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Articulos.Cap04
- {
- public sealed class DelegadoExpresionLambda
- {
- public static void Main()
- {
- // declaración de delegado genérico:
- Func<int, int, int> suma;
- // asignación de una expresión lambda:
- suma = (int a, int b) => a + b;
- Console.WriteLine ("La suma de 5 más 3 es igual a {0}", suma(7, 4).ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement