コード例 #1
0
 private void ThrowValidationScope()
 {
     using (ValidationScope scope = new ValidationScope(typeof(InvalidOperationException)))
     {
         scope.Error("Name cannot be empty!");
         scope.Error("Password cannot be empty!");
         scope.Throw();
     }
 }