views:

81

answers:

1

I can't seem to find a way to insert the method return type in a Resharper 5 macro. Can this be done?

For example, I have the following template:

Contract.Ensure(Contract.Result<$RESULTTYPE$>() != null);

I would like $REUSLTTYPE$ to be automatically filled with the data type of the current method, but I can't find a macro that would do that.

Thanks.

+3  A: 

Here you go:

http://hadihariri.com/blogengine/post/2010/10/14/Templates-Galore-Extending-Functionality-with-Macros.aspx

Hadi Hariri
Perfect, thanks. I'll get that implemented today.
Adam Ruth