Gramore
✅ What is reason of null! here?
As for best practice i am not sure, but if you have nullable enabled on the project and you want to indicate the string should not be null then i'd imagine it is correct but YMMV on what people do out in the wild ~
33 replies
✅ What is reason of null! here?
https://stackoverflow.com/questions/54724304/what-does-null-statement-mean for a much better written explanation 😁
33 replies
✅ What is reason of null! here?
If you are familiar with nullable value types
int?
for example it indicates that the int can be null.
string is a reference type and it is therefore possible that the value could be null (no reference). You could think of it as every string
is a string?
33 replies