Getting the constructorbody from IObjectCreationExpression

8 views
Skip to first unread message

Pascal Empl

unread,
Jun 23, 2016, 9:46:54 AM6/23/16
to resharper-plugins
I want to get the constructorbody (Collection of IStatement) from an IObjectCreationExpression.

At the moment i can get the IConstructor but not the iConstructorDeclaration.

Is there anywant to do what i want to do?

Matt Ellis

unread,
Jun 23, 2016, 11:14:28 AM6/23/16
to resharper-plugins
Yes, you should be able to call GetDeclarations on the IConstructor you've got, and then try to downcast to IConstructorDeclaration.

Regards
Matt

Pascal Empl

unread,
Jun 24, 2016, 2:28:54 AM6/24/16
to resharper-plugins
Thx, Matt.

Helped me alot.
Reply all
Reply to author
Forward
0 new messages