C# DateTime GetType
Description
DateTime GetType
gets the Type of the current instance.
Syntax
DateTime.GetType
has the following syntax.
public Type GetType()
Returns
DateTime.GetType
method returns The exact runtime type of the current instance.
Example
Gets the Type of the current instance.
using System;// ww w.j a v a 2 s .c o m
public class MainClass{
public static void Main(String[] argv){
DateTime july28 = new DateTime(2009, 7, 28, 5, 23, 15);
System.Console.WriteLine(july28.GetType());
}
}
The code above generates the following result.