C# - “IsValid” Boolean, or Void throwing exceptions - what are the best practices to validate data?

前端 未结 0 936
暖寄归人
暖寄归人 2020-12-02 00:26

I have two simulated methods, which one is "more correct" and better to use in program?

//First one
private bool IsNull(string variable)
{
  if(vari         


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