How to determine if a DateTime object is in VB.NET

The following works fine in C # (assuming value is an object ):

 if (value is DateTime) 

What is equivalent validation for VB.NET?

+6
source share
3 answers

VB.Net equivalent

 If TypeOf(value) Is DateTime Then 
+15
source share

FROM#

 if (value.GetType() is typeof(DateTime)) {} 

VB.NET (as converters say)

 If value.[GetType]() Is GetType(DateTime) Then '... End If 
+8
source share
 If TypeOf value Is DateTime Then 
+1
source share

All Articles