Application.Common.Helper.GetPersonType C# (CSharp) Метод

GetPersonType() публичный статический Метод

public static GetPersonType ( string personType ) : PersonType
personType string
Результат PersonType
        public static PersonType GetPersonType(string personType)
        {
            if (personType == null)
                throw new ArgumentNullException("personType");

            if (String.IsNullOrWhiteSpace(personType))
                throw new ArgumentOutOfRangeException("personType", personType, INVALID_PERSON_TYPE);

            switch (personType.ToUpper())
            {
                case "C": return PersonType.Client;
                case "E": return PersonType.Employee;
                default:
                    throw new ArgumentOutOfRangeException("personType", personType, INVALID_PERSON_TYPE);
            }
        }