Nullable<T>
as T?
CS-R1047System.Nullable<T>
indicates that the type T
may be null
. However, the said syntax can be shortened to T?
. This is more concise, readable, and easy to comprehend, especially for programmers coming from languages such as TypeScript.
Nullable<int> i = 0;
int? i = 0;