你的位置: 码友网首页 / 资讯源列表 / Guard Clauses and Exceptions or Validation?

关于[Guard Clauses and Exceptions or Validation?]的摘要:

Guard Clauses provide an elegant way to ensure code inputs are valid, typically by throwing exceptions. Validation provides a solution to a similar problem, typically without the use of exceptions. When does it make sense to use each of these techniques? This article is a response to a question I received from one of my tips newsletter subscribers, Chad Boettcher.

原文地址: https://ardalis.com/guard-clauses-and-exceptions-or-validation/

收录时间: 2022-01-20 浏览量: 1805 分类: .NET

| 0 收藏 | 0