/// <summary> /// Returns an indication whether a constant with a specified value exists in a specified /// enumeration. /// </summary> /// <typeparam name="T">An enumeration type</typeparam> /// <param name="value">An enumeration value</param> /// <returns> /// <c>true</c> if <paramref name="value"/> is valid for <typeparamref name="T"/>. /// </returns> public static bool IsDefined <T>(int value) where T : struct, E => EnumCompiledCache <T> .IsDefinedInt32(value);