source/R5T.NetStandard.Types/Code/Helpers/EnumHelper.cs
/// <summary>
/// Gets a message indicating the the input value of the <typeparamref name="TEnum"/> enumeration was unexpected.
/// This is useful in producing an error in the default case for switch statements based on enumeration values.
/// </summary>
/// <remarks>
/// See: https://stackoverflow.com/questions/13645149/what-is-the-correct-exception-to-throw-for-unhandled-enum-values
/// </remarks>
Gets a message indicating the the input value of the  enumeration was unexpected.
This is useful in producing an error in the default case for switch statements based on enumeration values.
Gets a message indicating the the input value of the enumeration was unexpected . This is useful in producing an error in the default case for switch statements based on enumeration values .
public static string UnexpectedEnumerationValueMessage<TEnum>(TEnum value)
            where TEnum : Enum
        {
            var output = $@"Unexpected enumeration value: '{value.ToString()}' for enumeration type {typeof(TEnum).FullName}";
            return output;
        }
public static string UnexpectedEnumerationValueMessage < TEnum > ( TEnum value ) where TEnum : Enum { var output = $@" Unexpected enumeration value: ' { value . ToString ( ) } ' for enumeration type  { typeof ( TEnum ) . FullName } " ; return output ; }
Gets a message indicating the the input value of the  enumeration was unexpected.
Gets a message indicating the the input value of the enumeration was unexpected .
value
TEnum
remarks
None