How to access to the parent object in c#
Store a reference to the meter instance as a member in Production: public class Production { //The other members, properties etc… private Meter m; Production(Meter m) { this.m = m; } } And then in the Meter-class: public class Meter { private int _powerRating = 0; private Production _production; public Meter() { _production = new … Read more