473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

object and Object

Hi all,

I am just starting to write some code in C#. One time I accidently used
"object" instead of "Object". The program didn't complain at all and worked
fine.

I am just wondering is there any difference between object and Object in C#?

thanks
--
Betty
Oct 17 '08 #1
9 1631
"c676228" <be***@newsgroup.nospamwrote in message
news:0E**********************************@microsof t.com...
I am just starting to write some code in C#. One time I accidently used
"object" instead of "Object". The program didn't complain at all and
worked
fine.

I am just wondering is there any difference between object and Object in
C#?
Search for a recent thread titled "String or string".
Oct 17 '08 #2
No there is no difference.

Object refers to the real name of the type: System.Object and object is
the language alias for that type.

--
Patrik Löwendahl
http://www.lowendahl.net
[MVP] [MCT - Enterprise Application Development]

c676228 skrev:
Hi all,

I am just starting to write some code in C#. One time I accidently used
"object" instead of "Object". The program didn't complain at all and worked
fine.

I am just wondering is there any difference between object and Object in C#?

thanks
Oct 17 '08 #3
Thank you both Patrick and Jeff.

Somehow I got an impression from somewhere before(Maybe another programming
language?) that String represent an object data type and string just
represent basic data type. That's why I cannot figure out the difference
between object and Object and I never knew it is an alias in C#.
--
Betty
""Patrik Löwendahl [MVP]"" wrote:
No there is no difference.

Object refers to the real name of the type: System.Object and object is
the language alias for that type.

--
Patrik Löwendahl
http://www.lowendahl.net
[MVP] [MCT - Enterprise Application Development]

c676228 skrev:
Hi all,

I am just starting to write some code in C#. One time I accidently used
"object" instead of "Object". The program didn't complain at all and worked
fine.

I am just wondering is there any difference between object and Object in C#?

thanks
Oct 17 '08 #4
There is no "primitive" types in C#, all the type keywords in the
language is mapped to a System.XXXX type, for some it's valuetypes like
int, datetime etc, and for others like string it's a reference type,
what most people call an object.

--
Patrik Löwendahl
http://www.lowendahl.net
[MVP] [MCT - Enterprise Application Development]

c676228 skrev:
Thank you both Patrick and Jeff.

Somehow I got an impression from somewhere before(Maybe another programming
language?) that String represent an object data type and string just
represent basic data type. That's why I cannot figure out the difference
between object and Object and I never knew it is an alias in C#.
Oct 17 '08 #5
c676228 wrote:
Thank you both Patrick and Jeff.

Somehow I got an impression from somewhere before(Maybe another programming
language?) that String represent an object data type and string just
represent basic data type. That's why I cannot figure out the difference
between object and Object and I never knew it is an alias in C#.
That would be Java. There is no such duplicate data types in C#, instead
it uses boxing whenever a value type needs to be stored as a reference type.

--
Göran Andersson
_____
http://www.guffa.com
Oct 18 '08 #6
Göran Andersson wrote:
c676228 wrote:
>Somehow I got an impression from somewhere before(Maybe another
programming language?) that String represent an object data type and
string just represent basic data type. That's why I cannot figure out
the difference between object and Object and I never knew it is an
alias in C#.

That would be Java. There is no such duplicate data types in C#, instead
it uses boxing whenever a value type needs to be stored as a reference
type.
Java does not have simple data types for neither Object nor String.

Arne
Oct 18 '08 #7
Hi Betty,

As for the following things you mentioned ,I think that might be specific
to some other programming language rather than .NET/C#.

===============
Somehow I got an impression from somewhere before(Maybe another programming
language?) that String represent an object data type and string just
represent basic data type.
==============

For .NET framework, all the core FCL is shared in all programming
languages. And for the Object class, the standard .NET class name is
System.Object, and in C#, the language provide the equivalent alias
"object". They are the same. But if you use "System.Object" style, that
will be easier for you to share the type name from other languages.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>Subject: Re: object and Object
Date: Fri, 17 Oct 2008 11:57:01 -0700
>
Thank you both Patrick and Jeff.

Somehow I got an impression from somewhere before(Maybe another
programming
>language?) that String represent an object data type and string just
represent basic data type. That's why I cannot figure out the difference
between object and Object and I never knew it is an alias in C#.
--
Betty
""Patrik Löwendahl [MVP]"" wrote:
>No there is no difference.

Object refers to the real name of the type: System.Object and object is
the language alias for that type.

--
Patrik Löwendahl
http://www.lowendahl.net
[MVP] [MCT - Enterprise Application Development]

c676228 skrev:
Hi all,

I am just starting to write some code in C#. One time I accidently
used
"object" instead of "Object". The program didn't complain at all and
worked
fine.

I am just wondering is there any difference between object and Object
in C#?
>
thanks
Oct 20 '08 #8
Hi Betty,

Do you still have any questions on this?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
--------------------
>From: =?Utf-8?B?YzY3NjIyOA==?= <be***@newsgroup.nospam>
References: <0E**********************************@microsoft.co m>
<e#**************@TK2MSFTNGP06.phx.gbl>
>Subject: Re: object and Object
Date: Fri, 17 Oct 2008 11:57:01 -0700
>
Thank you both Patrick and Jeff.

Somehow I got an impression from somewhere before(Maybe another
programming
>language?) that String represent an object data type and string just
represent basic data type. That's why I cannot figure out the difference
between object and Object and I never knew it is an alias in C#.
--
Betty
""Patrik Löwendahl [MVP]"" wrote:
>No there is no difference.

Object refers to the real name of the type: System.Object and object is
the language alias for that type.

--
Patrik Löwendahl
http://www.lowendahl.net
[MVP] [MCT - Enterprise Application Development]

c676228 skrev:
Hi all,

I am just starting to write some code in C#. One time I accidently
used
"object" instead of "Object". The program didn't complain at all and
worked
fine.

I am just wondering is there any difference between object and Object
in C#?
>
thanks
Oct 22 '08 #9
thank you all. I got it.
Betty
--
Betty
""Steven Cheng"" wrote:
Hi Betty,

As for the following things you mentioned ,I think that might be specific
to some other programming language rather than .NET/C#.

===============
Somehow I got an impression from somewhere before(Maybe another programming
language?) that String represent an object data type and string just
represent basic data type.
==============

For .NET framework, all the core FCL is shared in all programming
languages. And for the Object class, the standard .NET class name is
System.Object, and in C#, the language provide the equivalent alias
"object". They are the same. But if you use "System.Object" style, that
will be easier for you to share the type name from other languages.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Subject: Re: object and Object
Date: Fri, 17 Oct 2008 11:57:01 -0700

Thank you both Patrick and Jeff.

Somehow I got an impression from somewhere before(Maybe another
programming
language?) that String represent an object data type and string just
represent basic data type. That's why I cannot figure out the difference
between object and Object and I never knew it is an alias in C#.
--
Betty
""Patrik Löwendahl [MVP]"" wrote:
No there is no difference.

Object refers to the real name of the type: System.Object and object is
the language alias for that type.

--
Patrik Löwendahl
http://www.lowendahl.net
[MVP] [MCT - Enterprise Application Development]

c676228 skrev:
Hi all,

I am just starting to write some code in C#. One time I accidently
used
"object" instead of "Object". The program didn't complain at all and
worked
fine.

I am just wondering is there any difference between object and Object
in C#?

thanks

Oct 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't...
28
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
9
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
44
by: Steven T. Hatton | last post by:
This may seem like such a simple question, I should be embarrassed to ask it. The FAQ says an object is "A region of storage with associated semantics." OK, what exactly is meant by "associated...
16
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.