I\'m reading about extension methods, and monkeying around with them to see how they work, and I tried this:
namespace clunk {
public static class oog {
Console.WriteLine(5.doubleMe());
is equivalent to
Console.WriteLine(oog.doubleMe(5));
Given that, you can see why if ( 7 )
doesn't work.
Extension methods are nothing more than syntax.
As a side note since it is syntax you can call extension methods on null
variables because it translates to a normal method call, and methods can take null parameters.