-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Select Type #7545
Labels
Comments
Is this in lieu of actual pattern matching syntax for VB.NET? Given VB.NET's declaration syntax I would expect a syntax for this functionality to more look like this: Select Case obj
Case s As String
WriteLine($"The value is ""{s}"".")
Case p As Person
WriteLine($"The value is a person with the name ""{p.Name}"".")
End Select Have there been any syntax proposals for pattern matching in VB.NET at all? |
Our pattern-matching work is intended to extend to both C# and VB. We believe that pattern-matching is a much better fit for the use cases to which this feature would apply. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The premise of a
Select Type
is to act like aSelect Case
but allow the selection to use types.Grammar (v1)
A current work-around
Using
Select Type
The text was updated successfully, but these errors were encountered: