Skip to content
Discussion options

You must be logged in to vote

You must be thinking of generic constraints, which do have a syntax like that:

Public Class C
    Public Sub M(Of T As { IDisposable, IComparable })(ByVal o As T)
        
    End Sub
End Class

That's a very different thing, and C# already supports that with different syntax:

public class C {
    public void M<T>(T o) where T : IDisposable, IComparable { }
}

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ekolis
Comment options

Answer selected by ekolis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants