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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:08:17+00:00 2026-06-14T09:08:17+00:00

I got stuck when trying to get all inherited classes in metro. The WinRT

  • 0

I got stuck when trying to get all inherited classes in metro. The WinRT API is different from .net framework, so both the solutions (solution1 and solution2) don’t work.

Any code or tool solution is appreciated.

I’m still trying. I will put my solution here if success.

  • 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-14T09:08:19+00:00Added an answer on June 14, 2026 at 9:08 am

    This should work (based on the code from here):

    public IEnumerable<T> GetEnumerableOfType<T>(params object[] constructorArgs) where T : class, IComparable<T>
    {
        List<T> objects = new List<T>();
        foreach (Type type in typeof(T).GetTypeInfo().Assembly.ExportedTypes
                                       .Where(myType => myType.GetTypeInfo().IsClass && 
                                                        !myType.GetTypeInfo().IsAbstract && 
                                                        myType.GetTypeInfo().IsSubclassOf(typeof(T))))
        {
            objects.Add((T)Activator.CreateInstance(type, constructorArgs));
        }
        objects.Sort();
        return objects;
    }
    

    Basically TypeInfo is now the main class for doing any reflection operations and you can get it by calling GetTypeInfo() on the Type.

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

Sidebar

Related Questions

I'm making use of ZeroMQ from .NET and got stuck trying to fix a
I'm trying to learn from google code and I got stuck in some problems.
I got stuck again between browsers compatability issues, what I was trying todo is
I've got stuck in a problem with gflags when trying to find some memory
Got stuck here: http://jsfiddle.net/UFkg8/ Right now the animation is top-down. What do I need
Hi i got stuck with this problem, i can't find out how to get
I'm doing some assignment and got stuck at one point here. I am trying
After fighting all morning, I got the handshake to work but now I'm stuck
I am trying to learn backbone.js through the following example. Then I got stuck
I'm trying to learn C at got stuck with datatype-sizes at the moment. Have

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.