Solved

reflection quickie

Posted on 2006-10-30
2
211 Views
Last Modified: 2010-04-16
hi

i am running the following code:

 Assembly assembly = Assembly.Load(assemblyName);
 Type[] types = assembly.GetTypes();

            foreach (Type type in types)
            {
                if (type.BaseType != null)
                {

                 //do some things

                }
            }


is there a nice way to test if the object named "type" is an abstract class or a concrete class.

cheers
0
Comment
Question by:MrKevorkian
2 Comments
 
LVL 6

Accepted Solution

by:
der_jth earned 250 total points
Comment Utility
Well... type.IsAbstract?
0
 
LVL 1

Author Comment

by:MrKevorkian
Comment Utility
ha ha!  

that will do the job!!

thanks
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now