Re: Pass type to method to allow create and method invocation?

Tech-Archive recommends: Fix windows errors by optimizing your registry




On Aug 17, 4:59 pm, DeveloperX <nntp...@xxxxxxxxxxxxx> wrote:

Would that work? I read that as TScript must implement TScriptBase,
but we're passing in a class of type Type which does not.

Well, I would certainly recommend against passing a Type, because it
seems like something you would only do if late binding was your only
option. I got the impression your class hierarchy and its uses was
known at runtime, in which case the compiler and the CLR could do all
that work for you. But since I haven't the faintest clue about what
the bigger picture is, maybe a Type is what you need.

My knowledge might be muddied by the fact that it's a type of type
Type and Type might expose something that where understands...

No, I was only assuming a usage along the lines of, say:

DoExecute<ScriptCallInbound>(myScriptCallInbound);

Instead of passing a Type to DoExecute() and creating an instance
inside the method, wouldn't it make more sense to create an instance
outside the method and pass that?

.



Relevant Pages

  • Re: [LINUX/ TECH PROBLEM] Cant get this shit to boot....
    ... Northpoint wrote: ... > Im just passing thru reading posts and if you are still having problems ... > with this then I recommend what I did. ...
    (comp.os.linux.hardware)
  • Re: Pass type to method to allow create and method invocation?
    ... Well, I would certainly recommend against passing a Type, because it ... for wanting to create the object in DoExecute we can't really say. ... reasons you''ve listed above. ...
    (microsoft.public.dotnet.languages.csharp)
  • Checkpoint Textbook
    ... If I wanted to offer a checkpoint training course for a bunch of friends. ... What book would any of you recommend? ... What book for passing the tests? ...
    (Security-Basics)
  • Re: Probably a really stupid question
    ... 'phone-literate' with each passing moment... ... What would you guys recommend as far as hardware for Bluetooth sync'ing ...
    (microsoft.public.pocketpc)
  • Re: 70-215 score!!!
    ... here is an idea for microsoft, raise the bar. ... >i recommend a 900 for passing. ...
    (microsoft.public.cert.exam.mcse)