Wednesday, January 29, 2020

string? in a nullable string in C# 8 while string! is non-nullable

string can be either yet. I wondered how they, the powers that be, were going to introduce non-nullable strings. Now I know. What is more name!.Length is a hack to tell the compiler to assume name is not null even if name comes from a regular or nullable string.

No comments:

Post a Comment