You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the case will considered to have an embedded with applied on the case expr only not its body, and it will have effect over any outer with. The above syntax can be lowered to if statement.
The text was updated successfully, but these errors were encountered:
All of those things can easily be done in VB today with Select Case True and StartsWith is the same as X(0) = "?" where ? is the thing you want to match against.
@VBAndCs
You're right that Select Case True is essentially a rewrapped If ... Then ... ElseIf ... End If block.
In fact, unlike C#'s switch statement (before pattern matching came in), most Select Case statements in VB.NET actually get converted to If ... Else statements.
That considered, your proposal is also a repackaged If ... Else block. It will be useful if you can state how your suggestion improves the language in any way without being 'another way to do the same thing'.
I suggest to allow to composing the select case expr as a pattern using
?
like this:It will be lowered to:
I also suggest to allow using members of the Select expr in the cases:
the case will considered to have an embedded with applied on the case expr only not its body, and it will have effect over any outer with. The above syntax can be lowered to if statement.
The text was updated successfully, but these errors were encountered: