Al Programming
Free source code programming in C#, VB.Net, Java, SQL
Search This Blog
Friday, December 19, 2014
Object Type C# Example
C#
>
Types
>
object
You can assign values of any type to variables of type
object
.
Example
object
obj;
obj = 1;
string
type = obj.GetType().Name;
//Int32
obj =
"string"
;
type = obj.GetType().Name;
//String
Newer Post
Older Post
Home