EnvDTE Retrieving the data type from a CodeElement
Posted
by chrischu
on Stack Overflow
See other posts from Stack Overflow
or by chrischu
Published on 2010-06-03T20:36:43Z
Indexed on
2010/06/03
21:14 UTC
Read the original article
Hit count: 380
I am using EnvDTE to generate some code in my latest project.
I have a reference to a CodeClass-Object for a given C#-Class but now I wanted to loop through all of its members (in codeClass.Members) and check their types.
However I can't manage to retrieve the type of the given member from the CodeElement-Object that I get when looping through codeClass.Members.
How can I retrieve the type (int, string etc.)?
PS: Reflection is not an option for my usecase.
© Stack Overflow or respective owner