Reputation: 6478
The following works fine in c# (assuming value
is an object
):
if (value is DateTime)
What is the equivalent check for VB.NET?
Upvotes: 9
Views: 24150
Reputation: 15577
if (value.GetType() is typeof(DateTime)) {}
If value.[GetType]() Is GetType(DateTime) Then
'...
End If
Upvotes: 10