Calling a method to be implemented in the children from the base class?

Hi, I have an abstract class called Simulation as follows

that wants to call the Update() method that is to be implemented in the children as follows

but when I try to do that I get the "An object reference is required for the non-static field, method, or property 'Simulation.Simulation.Update()'" on the Update() line in the base class. Any idea how to implement this?

EDIT: Ok the error is due to calling a non static method from a static one of the same class. But if I don't put PrintSimulationData() as static how can I call it from MainClass directly?

by eclipseadb via /r/csharp

Leave a Reply