Feature request: use "var" the return value of an extracted method

Hello

I have the following code:

var salesOrganisation = new SalesOrganisation {Name =
"#SALESORGANISATION#"};
salesOrganisation = this.salesOrganisationFacade.Insert(salesOrganisation);

Using the Extract Method Refactoring I can create a GetSalesOrganisation()
method:

private SalesOrganisation GetSalesOrganisation()
{
var salesOrganisation = new SalesOrganisation {Name =
"#SALESORGANISATION#"};
salesOrganisation =
this.salesOrganisationFacade.Insert(salesOrganisation);
return salesOrganisation;
}

And my code will be replaced with the following code:

SalesOrganisation salesOrganisation = GetSalesOrganisation();

It would be great if the type would be implicitly declared as it was in the
original lines of code:

var salesOrganisation = GetSalesOrganisation();

Cheers

Gabriel Lozano-Moran


1 comment
Comment actions Permalink

Hello,

We appreciate your feedback. The corresponding JIRA request has been created,
and you are welcome to monitor its status at http://www.jetbrains.net/jira/browse/RSRP-72806.

You may want to check our request tracking policy here: http://www.jetbrains.net/confluence/display/ReSharper/ReSharperIssueTracker

Best regards,
- Development Team.


0

Please sign in to leave a comment.