4

When I do the extract method refactoring, ReSharper always wants to put the ByVal modifier everywhere. Explicitly putting ByVal isn't required anymore and Visual Studio itself doesn't do that anymore.

I've looked at the Visual Basic .NET subsection under the Code Editing section of ReSharper's options, but I don't spot anything. Is there a way to turn this off?

ReSharper's Extract Method dialog unwanted ByVal modifiers circled

Community
  • 1
  • 1
Jeff B
  • 8,572
  • 17
  • 61
  • 140

1 Answers1

2

Each variable needs to be ByVal or ByRef. In some compilers (like vb.net) you can omit the "ByVal" but it will use ByVal by default. The use of ByVal has not gone away, MS just though it could save you time in typing.

It sounds like you need to submit a feature request to ReSharper.

blindguy
  • 946
  • 10
  • 16
  • 3
    Said feature request [already exists](https://youtrack.jetbrains.com/issue/RSRP-288314#tab=History) and in fact *just today* moved into 'In Progress' ! – AakashM Jan 22 '15 at 15:44