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

DanP picture DanP · Oct 22, 2010 · Viewed 21.8k times · Source

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

if (value is DateTime)

What is the equivalent check for VB.NET?

Answer

tnyfst picture tnyfst · Oct 22, 2010

The VB.Net equivalent is

If TypeOf(value) Is DateTime Then