object cstrDateTime = new DateTime(); //this line set the type DateTime to the object
if (cstrDateTime.GetType().Name.ToString()=="DateTime") //compare the Type of the object
MessageBox.Show(cstrDateTime.GetType().ToString()); //just do something if its true.
I hope it helps