VB.NET: Why doesn't this nullable work?
dim str as nullable(of string)
is this syntax incorr开发者_Python百科ect?
Nullable(Of T)
is only applicable to non-nullable value types. String is a class - a reference type. A variable of type String
can already have a null value.
精彩评论