This means that SomeMethod() is an extension method to the Object class.
After defining this method, you can call this method on any instance of Object (despite being declared static ), for example:
object o = new Object(); bool someBool = true;
The this Object parameter refers to the object that you are calling it, and is not actually found in the parameter list.
The reason she declared static when you call it as an instance method is because the compiler translates this into a real static call in IL. This goes deep down, so I will not dwell on it in detail, but it also means that you can call it as if it were some static method:
object o = new Object(); bool someBool = true;
Boltclock
source share