reg Object data type

  • Thread starter Thread starter AVL
  • Start date Start date
A

AVL

Hi,
I've need clariifcation regarding the Obejct data type.
Is this object a value type or reference type?....
can you please some articles which give explaination as to why
it's treated as value type\reference type???

Thanks
 
Object is an reference type. It's the base class for all the reference
types. The reason why its a reference type is that Microsoft thought
that way :)
 
AVL said:
I've need clariifcation regarding the Obejct data type.
Is this object a value type or reference type?....
can you please some articles which give explaination as to why
it's treated as value type\reference type???

Object is a Reference type. When you assign a Value type to an Object it
suffers an operation that is called "boxing", where the value is moved into
a "box" that is assigned a reference. The opposite operation is "unboxing".
You will find plenty of information if you do a search for "boxing" and
"unboxing".
 
Hi,
I've need clariifcation regarding the Obejct data type.
Is this object a value type or reference type?....
can you please some articles which give explaination as to why
it's treated as value type\reference type???

Thanks

Object is a reference type as stated in the language specification
(http://www.google.dk/url?sa=t&ct=res&cd=1&url=http:/
%2Fdownload.microsoft.com%2Fdownload%2F3%2F8%2F8%2F388e7205-bc10-4226-
b2a8-75351c669b09%2FCSharp%2520Language
%2520Specification.doc&ei=I_Q8SKjhJ5CE1wassu3QDQ&usg=AFQjCNH48AGfZpjFXXCFdvGQ1yt9Mk_-
Iw&sig2=jAv7u0rD6lhN2g2JddAliA).

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top