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