Should I Throw ArgumentNullException if a string is blank?

前端 未结 7 1618
独厮守ぢ
独厮守ぢ 2020-12-14 00:11

I working on a method that does something given a string parameter. A valid value for the string parameter is anything other than null or string.Empty. So my code looks li

相关标签:
7条回答
  • 2020-12-14 00:40

    Taking all the things into account that have been said (Joe / Ahmad Mageed), I would create an exception for that case then.

    class ArgumentNullOrEmptyException : ArgumentNullException
    
    0 讨论(0)
提交回复
热议问题