Understand that extension methods do not literally change the compiled code base! This technique only
static keyword. The second point is that all extension methods are
marked as such by using the
this keyword as a modifier on the first (and only the first) parameter of the method in question. The
third point is that every extension method can be called either from the correct instance in memory
or
statically via the defining static class! Sound strange? Let’s look at a full example to clarify matters.
Do'stlaringiz bilan baham: