Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyBase
- {
- MyBase()
- {
- Record();
- }
- void Record()
- {
- /// this line is able to handle every object
- Recorder.Process(this);
- }
- }
- class DerivedA : MyBase
- {
- public int SpecialPropertyOfA { get; set; }
- DerivedA(int specialPropertyOfA)
- {
- SpecialPropertyOfA = specialPropertyOfA;
- }
- }
- class DerivedB : MyBase
- {
- public string SpecialPropertyOfB { get; set; }
- DerivedA(string specialPropertyOfB)
- {
- SpecialPropertyOfB = specialPropertyOfB;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement