Property - xkp/Doc GitHub Wiki
Properties are one of those things that every object seems to have and yet languages don't get right. Here is my attempt to:
property Identifier [: type] [= value];
or
property Identifier [: Type] { SET CODE }
or
property Identifier [: Type] = { GET CODE } {SET CODE}
Samples:
property x = 20;
property y : int;
property target
{
txtName.text = target.caption; //called on assign
}
property caption =
{
return txtName.text;
}
{
txtName.text = value; //"value" is a keyword
}