public bool TryParse <TEnum>(string value, out TEnum result) where TEnum : struct { return(_enum.TryParse(value, out result) && _enum.IsDefined(typeof(TEnum), result)); }