45

Possible Duplicate:
c#: difference between “System.Object” and “object”

Hello,

In C# there are Object and object types. They seem to have the same functionnality, so what is the difference between the two ?

0

4 Answers 4

66

There is none. C# provides synonyms for the primitives defined by the CLR. System.String -> string, System.Int64 -> long, System.Object -> object, etc.

Sign up to request clarification or add additional context in comments.

Comments

15

No difference.

object is a synomym of System.Object

It is there to allow old users to not get totally confused when they moved from an older system to this.

3 Comments

What do you mean by old users? The only people I've ever seen use Object instead of object are Java programmers :)
That's what I mean. People are used to use "object" so to not force them to use "Object", they still have "object"
C# devs that started deving back on asp.net 2 and before. Every object or int I ran into was Object or Int32.
8

I don't believe they are different, its like the difference between System.Int32 and int... they are the same essentially.

Comments

7

None.

The object type is an alias for System.Object in the .NET Framework. You can assign values of any type to variables of type object.

http://msdn.microsoft.com/en-us/library/9kkx3h3c%28VS.71%29.aspx

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.