Bandwidth.Standard/Voice/Models/CallbackMethodEnum.cs
/// <summary>
/// Converts a CallbackMethodEnum value to a corresponding string value
/// </summary>
/// <param name="enumValue">The CallbackMethodEnum value to convert</param>
/// <returns>The representative string value</returns>
Converts a CallbackMethodEnum value to a corresponding string value
Converts a CallbackMethodEnum value to a corresponding string value
public static string ToValue(CallbackMethodEnum enumValue)
        {
            switch(enumValue)
            {
                case CallbackMethodEnum.GET:
                case CallbackMethodEnum.HEAD:
                case CallbackMethodEnum.POST:
                case CallbackMethodEnum.PUT:
                case CallbackMethodEnum.PATCH:
                case CallbackMethodEnum.DELETE:
                case CallbackMethodEnum.OPTIONS:
                case CallbackMethodEnum.TRACE:
                    return stringValues[(int)enumValue];
                default:
                    return null;
            }
        }
public static string ToValue ( CallbackMethodEnum enumValue ) { switch ( enumValue ) { case CallbackMethodEnum . GET : case CallbackMethodEnum . HEAD : case CallbackMethodEnum . POST : case CallbackMethodEnum . PUT : case CallbackMethodEnum . PATCH : case CallbackMethodEnum . DELETE : case CallbackMethodEnum . OPTIONS : case CallbackMethodEnum . TRACE : return stringValues [ ( int ) enumValue ] ; default : return null ; } }
Converts a CallbackMethodEnum value to a corresponding string value
Converts a CallbackMethodEnum value to a corresponding string value
//only valid enum elements can be used //this is necessary to avoid errors //an invalid enum value was requested
The representative string value
The representative string value
enumValue
CallbackMethodEnum
The CallbackMethodEnum value to convert
The CallbackMethodEnum value to convert