G
Grant Schenck
Hello,
I have a base class with several derived classes:
ScriptBase
+ ScriptCallInbound
+ ScriptCallOutbound
I then have another class:
Line
Line has a method:
DoExecute()
What I want DoExecute to do be passed a type (ScriptCallInbound or
ScriptCallOutbound) and be able to call an Execute() method defined in the
ScriptBase as virtual and supplied by the derived classes.
So, I assume the DoExecute() method would need to accept some kind of type
of a ScriptBase derived class that it could then create a new instance of
and invoke the Execute() method. I want both the NEW and Execute() methods
to be handled by the actual type passed.
How do I go about doing this in C#?
Thanks,
Grant Schenck
I have a base class with several derived classes:
ScriptBase
+ ScriptCallInbound
+ ScriptCallOutbound
I then have another class:
Line
Line has a method:
DoExecute()
What I want DoExecute to do be passed a type (ScriptCallInbound or
ScriptCallOutbound) and be able to call an Execute() method defined in the
ScriptBase as virtual and supplied by the derived classes.
So, I assume the DoExecute() method would need to accept some kind of type
of a ScriptBase derived class that it could then create a new instance of
and invoke the Execute() method. I want both the NEW and Execute() methods
to be handled by the actual type passed.
How do I go about doing this in C#?
Thanks,
Grant Schenck