473,394 Members | 1,810 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,394 software developers and data experts.

Question On Reference Types

Hi All,
Probably it may be a dump question, But as iam in a learning
Phase, you have the right to ask these questions

Why we need Reference Types?
What is the advantage of that when compared to value types.

For eg: Class can be implemented using structures which is a value
type.

Thanks in Advance

Thomson

Nov 16 '05 #1
4 1000
If we only had struct/value types everytime you pass such an object to a
method or assign it to a variable the whole object would be copied.

"thomson" <sa**********@yahoo.com> schrieb im Newsbeitrag
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi All,
Probably it may be a dump question, But as iam in a learning
Phase, you have the right to ask these questions

Why we need Reference Types?
What is the advantage of that when compared to value types.

For eg: Class can be implemented using structures which is a value
type.

Thanks in Advance

Thomson

Nov 16 '05 #2
hi
Read this article from Skeet

http://www.yoda.arachsys.com/csharp/memory.html

you will get your questions answered there

regards
Ansil
Trivandrum

"thomson" wrote:
Hi All,
Probably it may be a dump question, But as iam in a learning
Phase, you have the right to ask these questions

Why we need Reference Types?
What is the advantage of that when compared to value types.

For eg: Class can be implemented using structures which is a value
type.

Thanks in Advance

Thomson

Nov 16 '05 #3
Hi all,
thanks for the informative reply

Regards

thomson
Ansil MCAD wrote:
hi
Read this article from Skeet

http://www.yoda.arachsys.com/csharp/memory.html

you will get your questions answered there

regards
Ansil
Trivandrum

"thomson" wrote:
Hi All,
Probably it may be a dump question, But as iam in a learning
Phase, you have the right to ask these questions

Why we need Reference Types?
What is the advantage of that when compared to value types.

For eg: Class can be implemented using structures which is a value
type.

Thanks in Advance

Thomson


Nov 16 '05 #4
Hi all,
thanks for the informative reply

Regards

thomson
Ansil MCAD wrote:
hi
Read this article from Skeet

http://www.yoda.arachsys.com/csharp/memory.html

you will get your questions answered there

regards
Ansil
Trivandrum

"thomson" wrote:
Hi All,
Probably it may be a dump question, But as iam in a learning
Phase, you have the right to ask these questions

Why we need Reference Types?
What is the advantage of that when compared to value types.

For eg: Class can be implemented using structures which is a value
type.

Thanks in Advance

Thomson


Nov 16 '05 #5

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

Similar topics

13
by: Abe Frohnman | last post by:
Hello all, I'm passing a reference to a class into the constructor of a form, like so: public MyForm(int count, ref Area myArea) {...} How can I use myArea outside the constructor? Should I...
8
by: Nader | last post by:
Hello all, In C# string is a reference type but I learned that string is different from other reference types such as class. For example, if you pass a string argument to a method and then...
26
by: phoenix | last post by:
Hello, I've got a design question. I need to keep track of some variables and I am planning to put them inside a class or struct. Basically I'm talking about 10 bools, 20 ints and 2 arrays of...
19
by: Xandau | last post by:
hello all, i wotk with java every day but last time i have interested in C#. everything goes great except one thing... in java everything is a reference (except plain types) so i thought that...
5
by: Zach | last post by:
When it is being said that, "value types are created on the stack or inline as part of an object". If a value type is created in an object, and that object is being called, the value type in that...
13
by: gmccallum | last post by:
General Info: A struct is stored on the stack and a class on the heap. A struct is a value type while a class is a reference type. Question: What if a struct contains a string...
13
by: cgough | last post by:
My true programming language is C++. I am at best a VB6 hacker that is just getting into VB.NET. I have a quick question about when to new and when not to new. Consider the following 2 classes....
0
by: Kaimar Seljamäe | last post by:
Hi, I have to create a web service client which uses SOAP encoding but does not use "multi-reference" values (see http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383513 item 10). If I...
20
by: David | last post by:
I feel like an idiot asking this but here goes: I understand the 'concept' of scope and passing data by value and/or by reference but I am confused on some specifics. class example{ int i; //my...
20
by: tshad | last post by:
Using VS 2003, I am trying to take a class that I created to create new variable types to handle nulls and track changes to standard variable types. This is for use with database variables. This...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.