Click to See Complete Forum and Search --> : A question about types


savagerx
January 8th, 2003, 12:21 PM
I understand that C#.NET basically contains 2 types namely reference types(classes) & value types(int,byte etc.), therefore I have the following enquiries:

Class Point
{
//fields
public int x;

//properties
public int X
{
get{return x;}
set{x = value;}
}
}

In this case, is it correct to label Point.X as a reference type and Point.x as a value type?

Please pardon me for asking such a stupid question for I am still a newbie(2 days old). Thank you all very much : )

pareshgh
January 8th, 2003, 01:34 PM
no its a property value... its not a reference.

Paresh

savagerx
January 8th, 2003, 02:07 PM
I see. Thank you : )