Solved

reflection quickie

Posted on 2006-10-30
2
212 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
ID: 17837070
Well... type.IsAbstract?
0
 
LVL 1

Author Comment

by:MrKevorkian
ID: 17840700
ha ha!  

that will do the job!!

thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
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, f…

910 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

22 Experts available now in Live!

Get 1:1 Help Now