ASP.NET SharpEightInfo类(1)

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

        }
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

m0_74456535

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值