public static NatTypeType FromValue(string value) { foreach (NatTypeType natTypeType in NatTypeType.Values()) { if (natTypeType.Value().Equals(value)) { return(natTypeType); } } throw new ArgumentException(value.ToString()); }
public static List <NatTypeType> Values() { NatTypeType natTypeType = new NatTypeType(); List <NatTypeType> natTypeTypeList = new List <NatTypeType>(); foreach (FieldInfo field in natTypeType.GetType().GetFields()) { natTypeTypeList.Add((NatTypeType)field.GetValue((object)natTypeType)); } return(natTypeTypeList); }