R
Rakesh
Hi,
Suppose I have a class definition like this:
public class CBase
{
public string m_Name = "asd";
public string Name
{
get
{
return m_Name;
}
}
}
Even though 'Name' is a read-ionly property, I can do this:
CBase c1 = new CBase();
c1.Name.Remove(0, 2);
So what's the point is declaring a get-only property?
Thanks,
Rakesh
Suppose I have a class definition like this:
public class CBase
{
public string m_Name = "asd";
public string Name
{
get
{
return m_Name;
}
}
}
Even though 'Name' is a read-ionly property, I can do this:
CBase c1 = new CBase();
c1.Name.Remove(0, 2);
So what's the point is declaring a get-only property?
Thanks,
Rakesh