Identity
Returns the identity of a value
Source
public static T Identity<T>(this T value)
{
return value;
}
Example
5.Identity(); // should return 5
ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Returns the identity of a value
public static T Identity<T>(this T value)
{
return value;
}
5.Identity(); // should return 5