How to create read only property in C# ?

A property that has only a get accessor is a read-only property .

Example :
public int Count {


get { return count; }

}

public int Capacity {

get {

return items.Length;

}
}

No comments:

Popular Posts