Files
ShrlAlgoToolkit/ConsoleApp/Program.cs
2024-09-22 11:05:41 +08:00

24 lines
538 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Diagnostics;
namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
string str = "";
double a = 10.0;
double b = 100;
//确保str满足条件才能继续执行不满足即抛出异常
Guard.IsNotNullOrEmpty(str);//抛出异常
Guard.IsLessThan(a,b);
}
}
}