摘要: 1.out-variables(Out变量) 2.Tuples(元组) 3.Pattern Matching(匹配模式) 4.ref locals and returns (局部变量和引用返回) 5.Local Functions (局部函数) 6.More expression-bodied me 阅读全文
posted @ 2017-12-13 18:42 ~向阳花~ 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 先来看一段Json.Net的代码 public JObject ToJson() { var result = new JObject(); result["X"] = X; result["Y"] = Y; return result; } 改进后的代码可以这么写 public JObject T 阅读全文
posted @ 2017-12-13 18:38 ~向阳花~ 阅读(139) 评论(0) 推荐(0) 编辑