views:

99

answers:

3

I don't need this declaration because it only makes my code big and unreadable.

Is there a way to make Visual Studio (VS) not add it automatically. Every time I remove it, it is added back by VS.

Function DoStuff(Tom As String)

NOT

Function DoStuff(ByVal Tom As String)
+6  A: 

It actually makes your code more clear to the non-believers. I don't think they hurt readability of the code, rather the opposite.

Romain
+6  A: 

Turn off pretty formatting at Tools/Options/Text Editor/Basic/VB Specific/Pretty Listing (reformatting) of code.

AMissico
I don't know why you want to do that, but I did answer your question.
AMissico
Actually, that is a fair point :)
Romain
I think this will remove some other formatting features that i need so ill just leave it as it is.
diamandiev
@diamandiev: maybe it's time to accept the answer then...
Romain
there is no answer. yet...
diamandiev
The only answer is turning off pretty formatting. Your question is a pet peeve. A petty issue at best. Sorry to be so blunt.
AMissico
alright man i tagged your answer, but only cause you answered some of my other questions.
diamandiev
A: 

Because the default is using ByRef, which you most certainly don't want.

catbert
No - It used to be in VBC, but VB.NET changed it to ByVal.
Dario