Variable type ending with ?

前端 未结 7 2122
别跟我提以往
别跟我提以往 2021-01-04 11:08

What does ? mean:

public bool? Verbose { get; set; }

When applied to string?, there is an error:

7条回答
  •  感情败类
    2021-01-04 11:46

    Only value types can be declared as Nullable. Reference types are bydefault nullable. So you cannot make nullable string since string is a reference type.

提交回复
热议问题