what is Public DateTime? Order

liptonIcedTea

Well-known member
Joined
Jan 18, 2007
Messages
89
Programming Experience
1-3
Hi,

I'm trying to convert an app from c# to vb.net

I was wondering...

if anyone knows how to convert this property

public DateTime? OrderDate {
get { return orderDate; }
set { orderDate = value; }
}

What is the ? at the end of DateTime do? And what is the VB.NET equal of it?

cheers
 
Its a shorthand syntax for using System.Nullable

VB.NET:
Public System.Nullable<DataTime> OrderDate {
get { return orderDate; }
set { orderDate = value; }
}

And the VB version would look something like..

VB.NET:
Public Property OrderDate() As System.Nullable(Of DateTime) 
    Get 
        Return orderDate 
    End Get 
    Set 
        orderDate = value 
    End Set 
End Property


I think... :p
 
Back
Top