Skip to content

How to override the method in C#

manu.laureys

Asked Oct 28, 2004, 1:38 AM EDT2 answers
Share
LinkedInX
I have a usercontrol. In that control I open and close the registerkey in the laod event. I also have a virtual method to read the settings from the registry. In the base this method is empty. What I want to do is, each time I use this control on a form, I want to override the method to read the settings, so that I can read the settings for that specific control. My problem is that I can't (or don't kow how to) override the method in my user control. Can anyone help with this problem?

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Do you meanoverriding an objects method outside of the class? If this is the case I don't think it can be done. But on the other hand... Why do you really need to override this function? can't you just let one instance know wich settings to load for himself? Or didn't I get the question right?
    0
  • 0
    Yea, that's really not possible.
    0