One very nice feature of extension methods is that they can be called on null objects, see this:
myclass x = null; x.extension_method();
Itβs a pity that, for example, most string methods are not extension methods, because
x.ToLower();
should return null if x is null. I mean that would be helpful.
When I need such transparency, I prefer to write extension methods.
source share