1.

What is the base class for all data types in C#.NET?

Answer»

SYSTEM.Object class in the BASE class for all data types in C#.NET. All classes in the .NET Framework are derived from Object. The object types can be assigned values of any other types.

The following DISPLAYS object:

object ob; OBJ= 5;

Let us see an example of comparing objects:

using System; class Example {    static void MAIN()    {        object val = new Object();        Console.WriteLine(val.GetType());    } }

The output:

System.Object


Discussion

No Comment Found