I am converting a lot of Java to C#. Many of the methods vary only in capitalization or other small syntax differences. So Java code such as
myString.toLowerCase();
will not compile but by adding an extension method
public static void toLowerCase(this string s)
{
s.ToLower();
}
I can catch all the methods (and I assume a good compiler will inline this anyway?).
It's certainly made the job much easier and more reliable.
(I thank @Yuriy - see answer in: differences between StringBuilder in Java and C#) for the suggestion.