Is it good idea to throw errors in separate method?

前端 未结 0 752
心在旅途
心在旅途 2020-11-29 23:40

I have a simple method:

 public void SomeMethod(string str)
 {
        if (str == null)
        {
            throw new ArgumentNullException(nameof(str));
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题