public static AccessLevelType FromValue(string value)
 {
     foreach (AccessLevelType accessLevelType in AccessLevelType.Values())
     {
         if (accessLevelType.Value().Equals(value))
         {
             return(accessLevelType);
         }
     }
     throw new ArgumentException(value.ToString());
 }
        public static List <AccessLevelType> Values()
        {
            AccessLevelType        accessLevelType     = new AccessLevelType();
            List <AccessLevelType> accessLevelTypeList = new List <AccessLevelType>();

            foreach (FieldInfo field in accessLevelType.GetType().GetFields())
            {
                accessLevelTypeList.Add((AccessLevelType)field.GetValue((object)accessLevelType));
            }
            return(accessLevelTypeList);
        }