dynamic code question?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • William Stacey

    #1

    dynamic code question?

    Say I have a multi-line text box on a form and "Run" botton. I want to type
    a class with fields and methods into the text box and try to instanciate it
    and run a method on the class and maybe even capture std out to an "Output"
    text box. How could this be done? tia

    --
    William Stacey



  • Jop Pascual

    #2
    Re: dynamic code question?

    CodeDOM is the answer...

    And here is a simple tutorial.


    Cheers
    --
    /jop


    "William Stacey" <staceyw@mvps.o rg> wrote in message
    news:%23VT5Kpue DHA.2144@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > Say I have a multi-line text box on a form and "Run" botton. I want to[/color]
    type[color=blue]
    > a class with fields and methods into the text box and try to instanciate[/color]
    it[color=blue]
    > and run a method on the class and maybe even capture std out to an[/color]
    "Output"[color=blue]
    > text box. How could this be done? tia
    >
    > --
    > William Stacey
    >
    >
    >[/color]


    Comment

    • Jeffrey Tan[MSFT]

      #3
      RE: dynamic code question?


      Hi William,

      What is the key difficulty in your task?
      I think you can get your task done by Reflection.

      Best regards,
      Jeffrey Tan
      Microsoft Online Partner Support
      Get Secure! - www.microsoft.com/security
      This posting is provided "as is" with no warranties and confers no rights.

      --------------------
      | From: "William Stacey" <staceyw@mvps.o rg>
      | Subject: dynamic code question?
      | Date: Sun, 14 Sep 2003 14:01:27 -0400
      | Lines: 10
      | X-Priority: 3
      | X-MSMail-Priority: Normal
      | X-Newsreader: Microsoft Outlook Express 6.00.3790.0
      | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
      | Message-ID: <#VT5KpueDHA.21 44@TK2MSFTNGP12 .phx.gbl>
      | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
      | NNTP-Posting-Host: 66.188.59.114.b ay.mi.chartermi .net 66.188.59.114
      | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
      | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1847 32
      | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
      |
      | Say I have a multi-line text box on a form and "Run" botton. I want to
      type
      | a class with fields and methods into the text box and try to instanciate
      it
      | and run a method on the class and maybe even capture std out to an
      "Output"
      | text box. How could this be done? tia
      |
      | --
      | William Stacey
      |
      |
      |
      |

      Comment

      • William Stacey

        #4
        Re: dynamic code question?

        Thanks!

        --
        William Stacey, DNS MVP

        "Jop Pascual" <joppascual at operamail.com> wrote in message
        news:#y80YRzeDH A.1764@TK2MSFTN GP09.phx.gbl...[color=blue]
        > CodeDOM is the answer...
        >
        > And here is a simple tutorial.
        > http://www.csharpfriends.com/Article...?articleID=118
        >
        > Cheers
        > --
        > /jop
        >
        >
        > "William Stacey" <staceyw@mvps.o rg> wrote in message
        > news:%23VT5Kpue DHA.2144@TK2MSF TNGP12.phx.gbl. ..[color=green]
        > > Say I have a multi-line text box on a form and "Run" botton. I want to[/color]
        > type[color=green]
        > > a class with fields and methods into the text box and try to instanciate[/color]
        > it[color=green]
        > > and run a method on the class and maybe even capture std out to an[/color]
        > "Output"[color=green]
        > > text box. How could this be done? tia
        > >
        > > --
        > > William Stacey
        > >
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...