Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a ReSharper template to generate a basic method?

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?

like image 506
Howard Pinsley Avatar asked Nov 26 '08 20:11

Howard Pinsley


2 Answers

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.

like image 147
Matt Campbell Avatar answered Nov 22 '22 10:11

Matt Campbell


I ended up with:

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

I tied it to the single letter "m".

like image 26
Howard Pinsley Avatar answered Nov 22 '22 11:11

Howard Pinsley