simple override and virtual question
-
hi, i'm not sure anymore, i've confused myself. i have this in a com-visible dll:
public class Interop : ITouchlibInterop { public virtual void fingerDown() { //some code here that handles the 'event' } }
now in another file, my interface (winforms);class Touch : Interop { public override void fingerDown() { //some new code that handles it } }
the first class (Interop : ITouchlibInterop) is called from a c++ dll via COM. then i want my derived class - that is my interface handle the 'event' and not the com-visible dll. now for my question: will Touch.fingerDown() be called when Interop.fingerDown() is called?rather have something you don't need, than need something you don't have
-
hi, i'm not sure anymore, i've confused myself. i have this in a com-visible dll:
public class Interop : ITouchlibInterop { public virtual void fingerDown() { //some code here that handles the 'event' } }
now in another file, my interface (winforms);class Touch : Interop { public override void fingerDown() { //some new code that handles it } }
the first class (Interop : ITouchlibInterop) is called from a c++ dll via COM. then i want my derived class - that is my interface handle the 'event' and not the com-visible dll. now for my question: will Touch.fingerDown() be called when Interop.fingerDown() is called?rather have something you don't need, than need something you don't have
Hi,
Interop a=new Touch();
a.fingerDown();will call Touch.fingerDown() although a is declared only as an Interop object. BTW you should start public methods with an uppercase letter. :)
Luc Pattyn [My Articles]
-
Hi,
Interop a=new Touch();
a.fingerDown();will call Touch.fingerDown() although a is declared only as an Interop object. BTW you should start public methods with an uppercase letter. :)
Luc Pattyn [My Articles]
thanks again for you help
rather have something you don't need, than need something you don't have