What is the smoothest, most appealing syntax you've found for asserting parameter correctness in c#?

后端 未结 14 1915
一个人的身影
一个人的身影 2020-12-22 23:50

A common problem in any language is to assert that parameters sent in to a method meet your requirements, and if they don\'t, to send nice, informative error messages. This

14条回答
  •  既然无缘
    2020-12-23 00:31

    This may be somewhat helpful:

    Design by contract/C# 4.0/avoiding ArgumentNullException

提交回复
热议问题