- ASP.NET Core 2 High Performance(Second Edition)
- James Singleton
- 73字
- 2021-07-08 09:39:00
More expression bodies
Expression bodies are expanded from the offering in C# 6, and you can now use them in more places, for example, as object constructors and property setters. Here, we extend our previous example to include the setting up of the value on the property we were previously just reading:
private static string text;
public static string Text
{
get => text ?? $"Today: {DateTime.Now:r}";
set => text = value;
}
推薦閱讀
- Three.js開發指南:基于WebGL和HTML5在網頁上渲染3D圖形和動畫(原書第3版)
- Java從入門到精通(第5版)
- Learning Three.js:The JavaScript 3D Library for WebGL
- Python編程:從入門到實踐
- Mastering VMware Horizon 7(Second Edition)
- Mastering SciPy
- Responsive Web Design with jQuery
- JavaScript高級程序設計(第4版)
- Spring MVC Cookbook
- Android Application Programming with OpenCV 3
- Swift語言實戰晉級(第2版)
- Modern R Programming Cookbook
- Practical C Programming
- Developing Multi:Platform Apps with Visual Studio Code
- PHP程序開發參考手冊