C# Func

Func<T,TResult>


Encapsulates a method that has one parameter and returns a value of the type specified by the TResult parameter.

Example

1. Assign a lambda expression

Func<string, int> stringLength = s => s.Length;

Console.WriteLine(stringLength("computer"));

Comments

Post a Comment