Page_Load(object sender, EventArgs e)---Why is "object" not capitalised?

"object" here should refer to the "Object" class. As with all class identifiers in the .NET framework, it is supposed to be capitalised although not case sensitive. But I realise in c# it is not capitalised by default. Why is that? Is it because C# is modelled after Java which had some sort of non capitalised object class? I can't remember Java syntax already.

Answers


object is just a C# keyword that refers to the System.Object class. In just the same way, string is a keyword that refers to the System.String class. You can use the capitalized and non-capitalized versions interchangably, but it helps to highlight that these two classes are treated "specially" by the C# language (in that object is the default class that all classes inherit from, and string is the type of "xyz" constant expressions).

Also, C# is case-sensitive. EventArgs is a different class to eventargs (say).


Need Your Help

how many times the row level trigger will fire when we update 10 rows

oracle plsql triggers

How many times the **row level trigger** will fire when we update 10 rows?

Inject property into integration test Grails 3

grails spock

How does one inject properties from the applicaiton.yml file into an integration test in grails 3.0 ?