Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using colons to put two statements on the same line in Visual Basic [closed]

Tags:

vb.net

vba

vb6

Is it considered bad practice to use colons to put two statements on the same line in Visual Basic?


1 Answers

There is nothing inherently wrong with using the colon to combine statements. It really depends on the context but as long as it doesn't reduce readability, there is nothing wrong with it.

As a general rule I avoid using the colon for this purpose. I find it's more readable to have one statement per line. However this is not a colon specific issue. I avoid doing the same with a semi-colon in C# or C++. It's just a personal preference.

like image 80
JaredPar Avatar answered Sep 15 '25 09:09

JaredPar