public static void Show()
{
#region 默认接口方法
CustomInterface interface1 = new CustomClass();
interface1.Show();
interface1.ShowInfo();
#endregion
#region switch 表达式
//老玩法
string week3 = WeekToStringSwitch(WeekInfo.Monday);
string week4 = WeekToStringSwitch(WeekInfo.Tuesday);
string week5 = WeekToStringSwitch(WeekInfo.Wednesday);
//新玩法
string week = WeekToString(WeekInfo.Monday);
string week1 = WeekToString(WeekInfo.Tuesday);
string week2 = WeekToString(WeekInfo.Wednesday);
#endregion
#region 属性模式
PropertyPattern product = new PropertyPattern()
{
ProductName = "朝夕架构班",
Price = 5499
};
PropertyPattern product1 = new PropertyPattern()
{
ProductName = "朝夕高级班",
Price = 4299
};
double price = PropertyPatternShow(product);
#endregion
#region 元组模式
string strResult = RockPaperScissors("444", "教育1");
string strResult1 = RockPaperScissors("444", "教育");
string strResult3 = RockPaperScissors("444", "教育3");
#endregion
#region 位置模式
PointInfo point = new PointInfo(123, 234);
int i = 11;
int j = 12;
point.Deconstruct(out i, out j);
#endregion
#region 静态本地函数
M();
static int M()
{
int y = 5;
int x = 7;
return Add(x, y);
static int Add(int left, int right) => left + right;
}
#endregion
#region 可空引用类型
//string? str = null;
//string str1 = null;
#endregion
#region 异步流
AsyncIEnumerableShow();
#endregion
}