Equivalent of C#'s ? overload for nullables?

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,081
Programming Experience
10+
In C# we can write:
int? i = 0;


and it actually declares:
Nullable<int> i = 0;


In VB this is:
Dim i as Nullable(Of int) = 0



Is there a short equivalent? I tried Dim i as Integer? = 0 but it doesnt understand.. :)
 
Throughout the documentation for the Nullable type the C# code examples use the short-hand and the VB examples use the long-hand. That suggests to me that there is not. Given that they are completely different languages this is not really a surprise.
 
Back
Top