Increment
Increments a integer number by one
Source
public static class IntExtensions
{
public static int Increment(this int i)
{
return ++i;
}
}
Example
5.Increment(); // result should be six
ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Increments a integer number by one
public static class IntExtensions
{
public static int Increment(this int i)
{
return ++i;
}
}
5.Increment(); // result should be six