Can I use Reflection to see if Member is Enum?

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

Is it possible to use Reflection to determine if a class's member is an
Enumerated Type?

Thank you.

--
Warm Regards,
Lee

"Upon further investigation it appears that your software is missing
just one thing. It definitely needs more cow bell..."
 
Lee,

Yes it is, when you get the Type of the property/field/method return
value/parameter, just call the IsEnum property on the Type, and check to see
if it is an enumeration.

Hope this helps.
 

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

Similar Threads


Back
Top