• Ian P (unregistered)

    This has been a fascinating discussion to read. Glad I could provide the WTF. Some more clarification: The methods were in the same namespace. The only time that the second method was called was with both parameters.

  • Pedro (unregistered)

    I seem to remember getting a compiler error in VS 2010 about this exact thing. Perhaps this restriction was relaxed in newer C# versions.

  • RandomECMAScriptDude (unregistered)

    Extension methods in C# reminds me of similar feature dynamically typed languages like Ruby/ Python/ Groovy. Even though it may seem beneficial and improve readability - it will only work on single member projects. The moment you have a team of developers then ambiguities like these happen. Another example is Perl - very readable but completely unmaintainable even by the same dude who wrote it 3 months back. Humans tend to have individualistic opinions on how same verb may be used on an entity to denote subtly different actions. It is best to avoid extensions if your project if is not a single person hobby.

    From the discussion it seems to me that C# programmers are rather sensitive species :)

Leave a comment on “Extending Yourself”

Log In or post as a guest

Replying to comment #:

« Return to Article