vb.net - Select Case True -


It is apparently used in a short circuit in VB6 and VBA and in the first case the true case is executed. :

<<>

Is it still in use (VB.NET)?

This syntax is often used by if ... alsef statement Some people find it a bit easier to read, for example:

  Select the correct case test case & lt; 0 console. Type ("You must provide a positive value.") Case test variable & gt; 10 consoles. Write ("Enter number from 0-10.") Select Case Trouble Call Drucker (Test Variable) End  

The answer is yes, it still works in VB.NET is . When you use it, take precautions because it is not "standard programming creation" and may be unfamiliar with people who maintain your code in the future.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -