views:

106

answers:

2

I'm new to ReSharper and am surprised that there isn't a template defined for

public void MethodName(<params>)
{

}

I realize I could create one, but I would have thought this would have been part of the standard product. Perhaps I'm missing some other shortcut?

+4  A: 

I'm not aware of any such default template, but as you pointed out it's terribly easy to write:

public void $METHODNAME$($PARAMS$)
{
    $END$
}

However, I'm more that a tiny bit perplexed that you're interested in making all your methods both public and void by default.

Matt Campbell
Good point. Probably they should be private an the return type should be parameterized. Thanks for your reply.
Decker
A: 

I ended up with:

private $RETURN_TYPE$ $METHODNAME$($PARAMS$)
{
    $END$
}

I tied it to the single letter "m".

Decker
I wonder what do you productivity gain do you have from such a template? You still have to type everything except few parentheses and braces. And this is better done with Complete Statement (Ctrl-Shift-Enter).
Ilya Ryzhenkov

related questions