ADim t As Type = GetType(DateTime)
Dim mi As MethodInfo = t.GetConstructor( _
New Type() {GetType(Integer), GetType(Integer), GetType(Integer)})
Dim d As Object = mi.Invoke(New Object() {2008, 5, 1})
Dim dToShortDateString As ConstructorInfo = t.GetMethod("ToShortDateString")
Console.WriteLine(DirectCast(dToShortDateString.Invoke(d, Nothing), String))
BDim t As Type = GetType(DateTime)
Dim ci As ConstructorInfo = t.GetConstructor(New Object() {2008, 5, 1})
Dim d As Object = ci.Invoke( _
New Type() {GetType(Integer), GetType(Integer), GetType(Integer)})
Dim dToShortDateString As MethodInfo = t.GetMethod("ToShortDateString")
Console.WriteLine(DirectCast(dToShortDateString.Invoke(d, Nothing), String))
CDim t As Type = GetType(DateTime)
Dim dToShortDateString As MethodInfo = t.GetMethod("ToShortDateString")
Console.WriteLine(DirectCast(dToShortDateString.Invoke(t, Nothing), String))
DDim t As Type = GetType(DateTime)
Dim ci As ConstructorInfo = _
t.GetConstructor(New Type() {GetType(Integer), GetType(Integer),
GetType(Integer)})
Dim d As Object = ci.Invoke(New Object() {2008, 5, 1})
Dim dToShortDateString As MethodInfo = t.GetMethod("ToShortDateString")
Console.WriteLine(DirectCast(dToShortDateString.Invoke(d, Nothing), String))