In the below 2 links i found that Object and object are interchangeable :
Difference between Object and object
c#: difference between "System.Object" and "object"
But i am just not able to understand why i can't make this below code to work, if Object and object are interchangeable:
Code that didn't work with "Object" :
class A : Object
{
public int x = 5;
}
class B : A
{
static void Main()
{
System.Console.WriteLine(new B().x);
}
}
Output:
The type or namespace name 'Object' couldnot be found (are you missing a using directive or an assembly reference?)
Code that worked with "object" :
class A : object
{
public int x = 5;
}
class B : A
{
static void Main()
{
System.Console.WriteLine(new B().x);
}
}
Output:
5