Пример #1
0
 /// <summary>
 ///     Indicates whether the specified enum value and the specified byte have the same value.
 /// </summary>
 /// <param name="enum">The enum to test.</param>
 /// <param name="value">The byte value to compare to the <paramref name="enum" />.</param>
 /// <returns>true if the value parameter is the same as the value of <paramref name="enum" />;othervise, false.</returns>
 public static bool Equals(this Enum @enum, byte value)
 {
     try
     {
         return(@enum.ByteValue() == value);
     }
     catch
     {
         return(false);
     }
 }