본문 바로가기
프로그래밍/CSharp

What is the purpose of a question mark after a type (for example: int? myVariable)?

by 액션신 신일석 2020. 12. 9.

tinyurl.com/y3eoyo5h

 

What is the purpose of a question mark after a type (for example: int? myVariable)?

Typically the main use of the question mark is for the conditional, x ? "yes" : "no". But I have seen another use for it but can't find an explanation of this use of the ? operator, for example. ...

stackoverflow.com

It means that the value type in question is a nullable type

태그

, ,

댓글0