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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:29:14+00:00 2026-05-12T08:29:14+00:00

After successfully getting a list of specific types out of an assembly using reflection,

  • 0

After successfully getting a list of specific types out of an assembly using reflection, I now want to get at the public properties of each of those.

Each of these types derives from at least one base class.

I notice when I get properties on a type that I get properties from the base classes as well.

I need a way to filter out base class properties and only get back the properties for the type that I am calling get properties on.

I reckon it would be similar to how I’m only getting sub classes of a base type, excluding the base type, from a given base type.

Assembly.GetAssembly(baseType).GetTypes().Where(type => type.IsSubclassOf(baseType)).ToList()
  • 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-05-12T08:29:14+00:00Added an answer on May 12, 2026 at 8:29 am

    Use BindingFlags.DeclaredOnly in your call to Type.GetProperties:

    var properties = Type.GetProperties(BindingFlags.DeclaredOnly | 
                                        BindingFlags.Public |
                                        BindingFlags.Instance);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working android application that required login, Now I want After successfully login
After successfully opening Pop3Folder , and retrieving messages from it, I then sometimes get
After successfully acquiring an oauth_token for a user, I am able to get successful
I'm using NetDataContractSerializer . After successfully deserializing an object, is there a way to
I am using Struts application while running welcome page is run successfully after that
I have been trying to post using RestKit after I have successfully used it
After a month of successfully getting my app on Heroku, everything stopped working. No
After successfully adding an object to a Parse.Relation using 1 this.topic.relation(friend).add(email); 2 this.topic.save(); I'm
I need to run Java from KSH script after getting a list of files
I'm getting these errors [http://pastebin.com/BEgNh2mm][chef-client/server errors] after successfully bootstrapping a node with chef. The

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.