C
C#17mo ago
Pacrombie

❔ ✅ Inheritance/sharing variables

In the pseudocode provided, is there a better way to do what I'm trying to do. Basically when one of the children is constructed in Class1, passing in itself, is there a way to, for example, make a constructor in the BaseClass that takes an object, and if that object shares any variable names, set BaseClass's variables of those shared names to the values of those in the parameter's?
2 Replies
Pacrombie
Pacrombie17mo ago
Nvm I found reflection !close
Accord
Accord17mo ago
Closed! Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.