struct and class (help!!!)

  • Thread starter Thread starter michael
  • Start date Start date
M

michael

How do I know whether a type is a struct or a class when
I use reflection.
for example:
Type[] t = dll.GetTypes();
t.IsClass is true for both struct and class, how do I
tell, please help !
 
michael said:
How do I know whether a type is a struct or a class when
I use reflection.
for example:
Type[] t = dll.GetTypes();
t.IsClass is true for both struct and class, how do I
tell, please help !


Use Type.IsValueType.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top