Skip to content
Discussion options

You must be logged in to vote

why in the Test.Run routine D.M(ReadOnlySpan<char> input) is chosen over D.M(string? input)

What is happening here is that D.M(ReadOnlySpan<char>) is chosen over C.M(string?), because methods from derived classes are considered before methods from base classes. And, for the purposes of overload resolution, D.M(string?) does not exist.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@fitdev
Comment options

@PathogenDavid
Comment options

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