EnumExtensionTests GetIndex Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void GetIndex()
Examples

[Test]
public void GetIndex()
{
    Assert.AreEqual(0, EnumExtensions.GetIndex(FlagsEnum.Red));
    Assert.AreEqual(1, EnumExtensions.GetIndex(FlagsEnum.Green));
    Assert.AreEqual(2, EnumExtensions.GetIndex(FlagsEnum.Blue));
    Assert.AreEqual(-1, EnumExtensions.GetIndex((FlagsEnum)17));
}
See Also