VB Byval I don't need it

2019-06-26 03:58发布

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)

3条回答
▲ chillily
2楼-- · 2019-06-26 04:16

Install Visual Studio 2010 Service pack 1. It doesn't insert the ByVal declaration.

查看更多
劳资没心,怎么记你
3楼-- · 2019-06-26 04:23

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

查看更多
看我几分像从前
4楼-- · 2019-06-26 04:36

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

查看更多
登录 后发表回答