if (!Enum.IsDefined(typeof(SearchMode), options))
     throw new ArgumentException(Properties.Resources.InvalidEnumerationValue, "options");

如果数据库中存储的值,在程序里用枚举表示,在做parse的时候可以使用这样的方法监测options的值。

相关文章:

  • 2022-12-23
  • 2021-05-21
  • 2022-01-16
  • 2022-12-23
  • 2021-11-04
  • 2021-07-14
  • 2021-10-28
  • 2021-11-02
猜你喜欢
  • 2022-01-03
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案