I would have looked at Google / MSDN, but I have no idea what he called, so I ask here.
In Java, I seem to remember that you can do it really cool, for example:
Class MyClass
{
int number;
MyClass() { }
void setNumber(int number)
{
this.number = number;
}
}
and then do something like:
MyClass myClass = new MyClass()
{
override void setNumber(int Number)
{
this.number = 2 * number;
}
};
... or something like that. Forgive any mistakes I made above - I actually did not touch Java after about 6 years.
The thing is, I remember that you could pseudo-extend the inline class.
Right now I need to expand the C # WinForms control, but I need to use it only once, and the changes are very minor. All I have to do is override the CreateParamsand property OnPaint().
, , , .Net, .
inline-extension #, Java? , ? ( , MSDN?)