码迷,mamicode.com
首页 > Windows程序 > 详细

c# 各种tips

时间:2018-04-13 14:29:28      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:request   bsp   zed   hive   blog   返回   表达   编译   c#   

1.lock 类似于 java中的synchronized,对对象或代码块加上互斥锁。

2.c#中的lambda表达式, ForEach(x => f(n))

3.c# 中的 something?.method  的含义是 如果something是null,返回null, 否则返回something的method,或者属性。

4.c# static readonly: https://www.cnblogs.com/qingxia/archive/2011/02/10/1950741.html 运行时赋值, Const 编译时赋值。

5.c# System.Threading.CancellationToken(其IsCancellationRequested方法)

6.c#中的 #region  #endregion 代码折叠,没啥卵用。

c# 各种tips

标签:request   bsp   zed   hive   blog   返回   表达   编译   c#   

原文地址:https://www.cnblogs.com/ppgeneve/p/8819826.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!