2
\$\begingroup\$

Any general tips for golfing in VB.net?

This, similar to Pascal, is a very rarely used language, thus having very few resources online

Visual Basic.NET (VB.NET) is a multi-paradigm, managed, type-safe, object-oriented computer programming language. Along with C# and F#, it is one of the main languages targeting the .NET Framework. VB.NET can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft.NET Framework.

(Quoted from https://stackoverflow.com/questions/tagged/vb.net)

Please post each tip as a separate answer

\$\endgroup\$
4
  • \$\begingroup\$ To prevent stacking of answers (better to post all you can in one answer instead of multiple) \$\endgroup\$
    – DialFrost
    Dec 24, 2021 at 13:34
  • 6
    \$\begingroup\$ But that means that different tips can't be voted on separately. If you're doing that, might as well have one big Community Wiki answer. \$\endgroup\$
    – wizzwizz4
    Dec 24, 2021 at 16:16
  • \$\begingroup\$ In every other language for golfing, every single person has posted all their tips in one post, if not, all you see is one guys name over and over again \$\endgroup\$
    – DialFrost
    Dec 25, 2021 at 0:23
  • \$\begingroup\$ isn't this already a thing? vb.net link \$\endgroup\$
    – Hydrazer
    Jan 4, 2022 at 17:56

2 Answers 2

2
\$\begingroup\$

If there is no parameters, you can remove the '()' when you call a function.

Console.ReadLine().Split()
Console.ReadLine.Split
\$\endgroup\$
1
0
\$\begingroup\$

You don't have to test booleans, you can test integers, it's true if not 0.

if(a<>0,do this,do that)
if(a,do this, do that)
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.