Eigenpoll : D wish list : Property shortcut
This would work as Ruby´s attr_writer and attr_reader and the easiest way to explain this is with an example:
This would do the same thing...
class MyClass
{
get set
{
int myInt;
}
}
like this
class MyClass
{
private int myInt_;
int myInt()
{
return myInt_;
}
int myInt(int value)
{
return myInt_ = value;
}
}
If you do like this
class MyClass
{
public get set
{
int myInt;
}
}
it would change the protection of the methods to public, the attribute would always be private.
of course you could do like this also
class MyClass
{
get
{
int myInt;
}
}
to only have a read property
Report this item for cleanup