Possible Duplicate:
c#: difference between “System.Object” and “object”
Although I am currently working with C#, this question could possibly apply to other languages.
Is there any difference between invoking Object vs. object? Specifically, I was creating an instance of Dictionary with the constructor:
Dictionary<String, Object> foo = new Dictionary...
The IDE automatically filled in new Dictionary<string, object>. I went back and changed my initial declaration but it got me wondering.
- Are there any adverse reactions when I use uppercase
StringorObjectversus lowercasestringorobject? - I’m assuming that uppercase refers to the class (so I can therefore access class methods) whereas lowercase simply refers to the type. Is this true?
objectis a keyword (alias) for System.Object, the same applies tostring.When compiled it will be exactly the same thing.
On the MSDN page for
objectit says the following:You can find a long list of all the keywords in C# on MSDN.