Reputation: 115
what is runtime data type in c#-4.0/Vs-2010 ?
thanks.
Upvotes: 0
Views: 89
Reputation: 1039418
It is the actual type of a variable at runtime. For example:
IFoo foo = new Bar();
The compile time type of the foo
variable is IFoo
and the runtime is Bar
. The runtime type can be obtained using the GetType method:
Type type = someInstance.GetType();
Upvotes: 3