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 7871093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:48:30+00:00 2026-06-03T01:48:30+00:00

I have come to the conclusion that using app domains for my project will

  • 0

I have come to the conclusion that using app domains for my project will be the best way to do it. I have to load different dll files into my project to use written from different developers. I have no clue where to start looking, and not entirely sure on how it all works. I have looked at a few examples, but they do not give me an clear understanding of what to do.
What I would like to know is, if I have a dll and load it into a app domain, will I be able to use the public methods within that dll, or how is this app domains used? I would also like someone who can maybe provide me with an tutorial link on how to use this, loading my dll, and accessing/using it.

Thanks in advance

  • 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-03T01:48:31+00:00Added an answer on June 3, 2026 at 1:48 am

    If you want to load a urefrenced dll of project in new appdomain at runtime then you need to mix reflection and app domain concept. It means load the dll using reflection in diffrent appdomain.

    Sample code for your problem:

    static void UsereflectionWithAppDomain()
    {
        AppDomain mydomain = AppDomain.CreateDomain("MyDomain");
        MethodInfo mi = default(MethodInfo);
    
        // Once the files are generated, this call is
        // actually no longer necessary.
    
        byte[] rawAssembly = loadFile(@"d:\RelectionDLL.dll");
    
        // rawSymbolStore - debug point are optional.
        byte[] rawSymbolStore = loadFile(@"d:\RelectionDLL.pdb");
        Assembly assembly = mydomain.Load(rawAssembly, rawSymbolStore);
    
        Type reflectionClassType = assembly.GetType("ReflectionDLL.MyStaicClass");
    
        mi = reflectionClassType.GetMethod("PrintI");
        mi.Invoke(null, null);
    
        AppDomain.Unload(mydomain);
    }
    
    
    // Loads the content of a file to a byte array. 
    static byte[] loadFile(string filename)
    {
        FileStream fs = new FileStream(filename, FileMode.Open);
        byte[] buffer = new byte[(int)fs.Length];
        fs.Read(buffer, 0, buffer.Length);
        fs.Close();
    
        return buffer;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have come to the conclusion that SQL Server CE isn't a viable product.
I have been trying to update a text field in a form that will
Let me say, I have come to the conclusion (after a lot of trial)
I'm designing a tool using Java 6, that will read data from Medical Devices.
I have a C++ MFC app that stores all of its system wide configuration
Using Delphi XE on Win7 x64, have Jedi Class Library ver. 3.45, and 7z.dll
I have a php function I wrote that will take a text file and
I am using ZipArchive to unzip tz files in my iphone App. It works
I am creating a viewController programmatically (hopefully the right way) My problem is that
Through various questions I have asked here and other forums, I have come to

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.