IsEven

edit

IsEven

Namespace

Summary== Determines if an integer is even ==Example==string fileText=SubSonic.Sugar.Files.GetFileText("C:\\MyFile.txt"); ==Unit Test

[Fact] public void IsEvenShouldReturnTrueFor2And4() { Assert.True(2.IsEven()); Assert.True(4.IsEven()); } [Fact] public void IsEvenShouldReturnFalseFor1And3() { Assert.False(1.IsEven()); Assert.False(3.IsEven()); }

Comments

SubSonic 3.0 implements this as an extension method - 2.x uses a static method on SubSonic.Sugar.Numeric.