System.Globalization.Tests.Unicode_Win7_IdnaTest.ConvertStringToType C# (CSharp) Method

ConvertStringToType() private static method

private static ConvertStringToType ( string idnType ) : IdnType
idnType string
return IdnType
        private static IdnType ConvertStringToType(string idnType)
        {
            switch (idnType)
            {
                case "T":
                    return IdnType.Transitional;

                case "N":
                    return IdnType.Nontransitional;

                case "B":
                    return IdnType.Both;

                default:
                    throw new ArgumentOutOfRangeException("idnType", "Unknown idnType");
            }
        }