Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8814901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:14:38+00:00 2026-06-14T04:14:38+00:00

Say you have This, which is compiled into a dll: namespace HelloWorld { public

  • 0

Say you have This, which is compiled into a dll:

namespace HelloWorld
{
   public class Hello
   {
        public void WriteHello()
        {
             Console.Writeline("Hello World");
        }

        **public void WriteHello2()
        {
             Console.Writeline("Hello World2");
        }**
   }
}

I want the method WriteHello2 to actually be in a text file and compiled from there, in this program.

REASON

I want to create an interface where the user creates a method. Then I will write this method into a text file, and so whenever the program is run it will read in the text file, and execute that piece of code.

Example

Say my dll only consists of 1 method i.e. WriteHello.
The user runs the program, and then creates a new method say WriteHello2( he cannot create any method it is limited to my application). Now the dll should contain 2 methods.

I am not sure if any of this is possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:14:40+00:00Added an answer on June 14, 2026 at 4:14 am

    To compile the code from a string, you can use the CompileAssemblyFromSource method. Things become more complicated if you want the changes to be persisted, that is, to have the program self-modify its binaries. I’m not sure if that’s what you want, but it’s doable with some clever temporary file juggling and process coordination.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say have this immutable record type: public class Record { public Record(int x,
Let's say you have some Java code as follows: public class Base{ public void
I have this 2D array (say double[10][10]) which contain some 1.0 and 10.0, rest
I have this huge domain object(say parent) which contains other domain objects. It takes
Say I have something like this, which sends unhanded exceptions to logging.critical() : import
I have a servlet which takes us to an existing jsp, say home.jsp. This
Say I have this code - public interface ParentInterface1 { public List<? extends ChildInterface1>
Say I have a feature branch, into which I merge upstream changes prior to
Say I have this: private list<myClass> myCollection; Is there a programming idiom to shorten
Say i have this this structure. MyApp ├── main.py └── package ├── __init__.py ├──

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.