How can we have a variable that is writable within the class but only "readable" outside it?
For example, instead of having to do this:
Class C {
private int width, height;
int GetWidth(){
return width;
}
int GetHeight(){
return height;
}
// etc..
I would like to do something like this:
Class C {
public_readonly int width, height;
// etc...
What's the best solution?