mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
個人BLOG
it developer
  1. Main page
  2. DotNET
  3. Main content

C# 变量后面跟问号

2020-02-02 120hotness 0likes 0comments

表示该变量为null时,不执行该语句。

当val=null时

val?.ToLower();返回值=null

没有“?”时,显然要报错的。
Tag: Nothing
Last updated:2020-02-02

mikebai

This person is a lazy dog and has left nothing

Like
< Last article
Next article >

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang