I've been programming Java for years but now I'm working with C#. Is it possible in C# to override a function when creating an instance of an object? In Java it is possible to do this:
View v = new View(this) {
@Override
protected void onDraw(Canvas canvas) {
System.out.println("large view on draw called");
super.onDraw(canvas);
}
};
This means that the object v will have it's method "onDraw" overrided. Is it possible to do this in C#? if yes, How?
Many Thanks!