Replies: 1 comment
-
Yes, that behaviour is intended. Extension method resolution works on "closeness" and will stop as soon as it finds a suitable match in the closest possible location. There's a great article by Eric Lippert called Closer is better that explains the mechanism nicely. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Compile the following code:
I expected that
Something.ArrayExtensions.IsNullOrEmpty<T>
would be invoked.But the method search algorithm seems to stop searching for extension methods if multiple candidates where found in current or parent namespace. It seems to continue than with namespaces in using clauses.
Is that behaviour intended?
Beta Was this translation helpful? Give feedback.
All reactions