4 ms·
Weird definition since it misses the point. Extension methods are: I want to add a new method(not function) to object which I dont have control of (in the code
by hardware2win 4y ago
Weird definition since it misses the point.
Extension methods are: I want to add a new method(not function) to object which I dont have control of (in the code sense)
So I can call "externalObj.MyNewMethod()", so extend its behaviour
- javcasas 4y agoYep, a weird definition. "I want to add a new not-a-method (because it can't access private stuff, unlike real methods) so that I can do "externalObj.MyNewMethod()" because doing "myNewOperation(externalObj)" is somehow forbidden."
- hardware2win 4y agoOf course it cannot access internals because youd break "sane oop"