Sunday, November 18, 2018 18:51

Object variable type

Object variable type is a special type, the parent of all other types in the .NET Framework. It can accept values from any other type in C#, and we declare it using the word object

In the following example you can see how we can assign any type to an object variable type:

And the output would be:

object variable type

As you can notice, the object variable can be very versatile, and we can use it as a universal data container.

Comments

comments

Tags: , ,

Leave a Reply