C# 6.0 語法糖-「?.」

C# 6.0 語法糖-「?.」

C# 6.0常用的語法,讓程式碼更簡潔好看。

參考:【Null 條件運算子】、【Null 聯合運算子


P.S. 想知道自己的專案支援C#版本,在專案屬性中選擇「建置」頁籤,點選下方的「進階」,就可以知道囉。


創用 CC 授權條款
本著作由Chenting Weng製作,以創用CC 姓名標示 4.0 國際 授權條款釋出。
This work by Chenting Weng is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at https://dotblogs.com.tw/chentingw.


Part of the content of the article will refer to the profile or picture of other websites.
If there is any infringement of your copyright, please leave a message and let me remove it as soon as possible.
Disclaimer:The article is for personal use and is for reference only. I will not bear any responsibility for any loss caused by quoting the article. If there is an error, please leave a message to inform.