当前位置: 首页 > news >正文

手机版网站seo怎么做外包公司好么

手机版网站seo怎么做,外包公司好么,品牌营销策划书模板,网站搭建就来徐州百度网络非常好C# 9 新特性 —— 增强的模式匹配IntroC# 9 中进一步增强了模式匹配的用法#xff0c;使得模式匹配更为强大#xff0c;我们一起来了解一下吧SampleC# 9 中增强了模式匹配的用法#xff0c;增加了 and/or/not 操作符#xff0c;而且可以直接判断属性#xff0c;来看一下下… C# 9 新特性 —— 增强的模式匹配IntroC# 9 中进一步增强了模式匹配的用法使得模式匹配更为强大我们一起来了解一下吧SampleC# 9 中增强了模式匹配的用法增加了 and/or/not 操作符而且可以直接判断属性来看一下下面的这个示例var person  new Person();// or // string.IsNullOrEmpty(person.Description) if (person.Description is null or { Length: 0 }) {Console.WriteLine(${nameof(person.Description)} is IsNullOrEmpty); }// and // !string.IsNullOrEmpty(person.Name) if (person.Name is not null and { Length:  0 }) {if (person.Name[0] is ( a and  z) or ( A and  Z) or .){} }// not if (person.Name is not null) { } 这里的代码使用 DnSpy 反编译之后的代码是下面这样的Person person  new Person(); string text  person.Description; bool flag  text  null || text.Length  0; if (flag) {Console.WriteLine(Description is IsNullOrEmpty); } text  person.Name; bool flag2  text ! null  text.Length  0; if (flag2) {char c  person.Name[0];if (c  a){if (c  z){goto IL_8B;}}else if (c  A){if (c  Z){goto IL_8B;}}else if (c ! ,  c ! .){goto IL_8B;}bool flag3  true;goto IL_8E;IL_8B:flag3  false;IL_8E:bool flag4  flag3;if (flag4){} } bool flag5  person.Name ! null; if (flag5) { } Switch这不仅适用于 is 也可以在 switch 中使用switch (person.Age) {case  0 and  3:Console.WriteLine(baby);break;case  3 and  14:Console.WriteLine(child);break;case  14 and  22:Console.WriteLine(youth);break;case  22 and  60:Console.WriteLine(Adult);break;case  60 and  500:Console.WriteLine(Old man);break;case  500:Console.WriteLine(monster);break; } 反编译后的代码int age  person.Age; int num  age; if (num  22) {if (num  14){if (num  0){if (num  3){Console.WriteLine(child);}else{Console.WriteLine(baby);}}}else if (num  14){Console.WriteLine(youth);} } else if (num  60) {if (num  22){Console.WriteLine(Adult);} } else if (num  500) {Console.WriteLine(monster); } else {Console.WriteLine(Old man); } More可以看到有些情况下可以简化不少代码尤其是 if 分支比较多的情况下使用上面 switch 这样的写法会清晰很多但是如果只是 string.IsNullOrEmpty 这种代码最好还是不要写得这么骚了小心要被同事吐槽了炫技需谨慎小心被 ...Referencehttps://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9https://github.com/WeihanLi/SamplesInPractice/tree/master/CSharp9Samplehttps://github.com/WeihanLi/SamplesInPractice/blob/master/CSharp9Sample/PatternMatchingSample.cs
http://www.zqtcl.cn/news/115607/

相关文章:

  • 电子商务网站开发费用入账wordpress商城主题模板下载
  • 广西南宁公司网站制作百度推广自己做网站吗
  • 网站建设公司外链怎么做网站开发职业类别代码
  • 网站优化公司怎么选免费手机网站建设
  • 怎么建立自己的网站平台多少钱专用于做网站公司
  • 怎么修改网站后台权限商城网站制作 价格
  • 英铭广州网站建设wordpress服务器域名
  • 怎么做微商网站怎么生成网站源代码
  • 建设网站怎么设置网站页面大小外贸原单童装哪个网站做
  • 网站布局设计软件太原专业做网站
  • 织梦教育培训网站源码素材图下载
  • 内容网站外贸网站外贸网站建设行吗
  • 什么是网络营销定义北京网站关键词优化
  • 开奖视频网站开发成都优化官网公司
  • 网站开发培训学校互联网软件外包平台
  • 房屋网签查询系统官方网站建设网站总经理讲话范本
  • 创建网站好的平台罗湖网站建设优化
  • 青海兴远建设工程有限公司网站wordpress怎么设计网站
  • 泉州建站公司模板马云谈2025的房价
  • 动漫制作专业什么电脑最适合沈阳关键词优化报价
  • seo企业网站源码虚拟主机如何建设多个网站
  • 电商 网站模板借钱软件推广微信hyhyk1
  • 免费网站模板psd建网站程序工具
  • 企业建设网站专业服务网站设置文件夹权限
  • 用ip做网站威海市城乡建设局网站
  • 网页网站开发设计工作前景做网站 兼职
  • c 网站开发类似优酷乐山旅游英文网站建设
  • 网站空间租用哪家好小程序免费制作平台企业中心
  • 个人网站可以做哪些主题网站别人做的收到方正侵权
  • 网站seo最新优化方法网络营销做的好的企业