I just installed Visual Studio 2010 Service pack (proposed on Windows Update), and I can see a new feature on the "intellisense" that means when I write a Function
or Sub
in VB.NET it doesn't auto-complete parameters with ByRef
or ByVal
...
1) Is there anyway that I can configure this option back to how it was before?
2) If I don't specify ByX
, which one is used by default? (it seems like it is always ByRef
)
It seems that this post covers your question:
So no, there is no way to get the old behaviour. From now on ByVal
is the default (what it was before) and it won't get added automatically to the method parameters.
In my opinion this is a good decision since it's making VB.NET a bit more consistent with C# and avoids unnecessary "noises"(it's already verbose enough).
Old behaviour:
Private Sub test(ByVal test As String)
End Sub
New behaviour
Private Sub test(test As String)
End Sub