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

  • Home
  • SEARCH
  • 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 7977635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:15:34+00:00 2026-06-04T09:15:34+00:00

I want to get a type from an unreferenced assembly. I used this answer

  • 0

I want to get a type from an unreferenced assembly. I used this answer to solve my problem.

The problem now is, that I’m loading the type ObjectList which contains another type from another assembly. I do it like this:

Assembly assembly = Assembly.LoadFrom ("@c:\myAssemblies\myAssembly.Data.DomainObjects.dll");
Type myType = assembly.GetType ("myAssembly.Data.DomainObjects.ObjectList`1[[myAssembly.otherNamespace.myClass, myAssembly.otherNamespace, Version=1.13.73.1082, Culture=neutral, PublicKeyToken=fee00910d6e5f53b]]");

The assembly with the otherNamespace is also not referenced and therefore the GetType method returns null. My question now is:

Is it possible to get the type of an object list which contains another type of an unreferenced assembly? Or: How can I load the assembly of a type within my ObjectList?

  • 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-04T09:15:35+00:00Added an answer on June 4, 2026 at 9:15 am

    Ok, this is a little hard for me to test – but I hope my answer can be converted:

    basically, you need to do it in two steps –

    1. resolve the generic parameter type (myAssembly.otherNamespace.myClass, in your case)
    2. generate the new type, based on type of the generic parameter.

    Here’s a Linqpad script:

    void Main()
    {
        //resolve the inner type
        var  parameterType = Type.GetType("UserQuery+GenericParameter");
    
        //Use the generic type, and generate with the inner parameter type
        var genericTypeWithParameter = Type.GetType("UserQuery+Moop`1")
            .MakeGenericType(parameterType);
    
        //The resolved type - printed to console
        genericTypeWithParameter.Dump();
    }
    
    public class Moop <T> { }
    public class GenericParameter { }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading a type from an external assembly and want to create an
I want to get a MIME Content-Type from a given extension (preferably without accessing
I got this url /search/renttype-all.place-all.type-all.bedrooms-all.0.0/ I want to get the text after the second
i want get weather from http://www.google.com/ig/api?weather= I use this // load xml result from
I want get the user profile large or normal picture from facebook. Now I
I'm doing a file upload, and I want to get the Mime type from
I want to get images from a flickr rss but this code won't get
I want to get around type erasure in match case using the code from
I want to get the MIME type from a filename using C. Is there
I want to get a type of a BasePage object that I am creating.

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.