Reflection: enumerating constants

  • Thread starter Thread starter Jeff Johnson
  • Start date Start date
J

Jeff Johnson

I know how to get the fields, methods, properties, etc. from a type using
reflection. How do you get the constants?
 
I know how to get the fields, methods, properties, etc. from a type using
reflection. How do you get the constants?

Since you know how to retrieve fields, you know how to retrieve
constants. Constants are static fields with FieldInfo.Literal = true.


Mattias
 

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