G
Guest
I decleared interface with read only property
interface IPersonName
{
string Name { get; }
}
and in implementation of this interface, i implemented as read/write property
classs Student : IPersonName
{
string _name;
public sting Name
{
get { return _name; }
set ( _name = value; }
}
}
this code compiled successfully, Why?
interface IPersonName
{
string Name { get; }
}
and in implementation of this interface, i implemented as read/write property
classs Student : IPersonName
{
string _name;
public sting Name
{
get { return _name; }
set ( _name = value; }
}
}
this code compiled successfully, Why?