ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Checks whether a number is even
public static bool IsEven(this int value) { return value % 2 == 0; }
int number = 1; bool isEven = number.IsEven(); // false int number = 2; bool isEven = number.IsEven(); // true
Author: K M Thomas
Submitted on: 25 mrt. 2016
Language: C#
Type: System.Int32
Views: 8021