ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods

Identity

Returns the identity of a value

Source

public static T Identity<T>(this T value)
{
    return value;
}

Example

5.Identity(); // should return 5

Author: McBrover

Submitted on: 6 mrt. 2015

Language: C#

Type: object

Views: 5595