Debug.Assert vs Exceptions

前端 未结 8 1132
面向向阳花
面向向阳花 2020-12-13 21:03

Surprisingly I was only able to find one previous question on SO about this subject, and I\'d just like to get the community \"Vote of Confidence\" (or not!) on my approach.

8条回答
  •  抹茶落季
    2020-12-13 21:47

    In .Net, Debug class methods are not included in your program when you do make a release build, so you will have to throw an exception if this code makes it to production.

提交回复
热议问题