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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:30:59+00:00 2026-06-09T20:30:59+00:00

Is it possible to get an abstract type from a given Assembly at runtime?

  • 0

Is it possible to get an abstract type from a given Assembly at runtime?

I am currently loading my assembly with:

Assembly assem = Assembly.LoadFrom("MyAssemblyName.dll");

But then I want to do this:

Type t = assem.GetType("Enterprise.Shared_Party_PersonType");

My class is defined as:

public abstract class Shared_Party_PersonType

But type t is returning null.

My final goal is to navigate an abstract class with reflection and get a list
of properties of that abstract class, similar to what they do here: access-to-properties-of-abstract-class-with-reflection

Any help will be very appreciated.

Solution: Turns out that I was loading the wrong version of the DLL, which didn’t contain the abstract type I was trying to load. However, now I know that you can navigate and manipulate abstract types with reflection as any other concrete type. Also I learned about Assembly.RefelectionOnlyLoadFrom method thanks to @Fuex to load an assembly in reflection-only context

  • 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-09T20:31:00+00:00Added an answer on June 9, 2026 at 8:31 pm

    Maybe your class is defined inside some other class. In that case you must use a + (plus) instead of a . (dot). Like this:

    assem.GetType("OutermostNamespace.InnerNamespace.Enterprise+Shared_Party_PersonType")
    

    where Enterprise is an “outer” class or struct that Shared_Party_PersonType is defined inside.

    Otherwise, can you access the source code of MyAssemblyName.dll? Then you might try to se what string n = typeof(Shared_Party_PersonType).FullName returns in there, to check if the type name is really what you presume.

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

Sidebar

Related Questions

Possible Duplicate: Get all files from VSS for a given date? I need to
Is it possible to get the class type from inside the static initialization block?
I know it isn't possible to inherit from a generic type parameter, but it
Possible Duplicate: Get file name from URI string in C# How to extract file
is that possible create an abstract class from DbQuery and IDbSet? I'm trying to
Is it possible to have an abstract property which returns a type defined in
does anyone know how to (if possible) get the owner of the tag on
I am trying to work out if it is possible get JPA to persist
Possible Duplicate: Get variable name. javascript “reflection” Is there a way to know the
Possible Duplicate: Get the resolution of a jpeg image using C# and the .NET

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.