Re:Update to the .NET Language Strategy
by javcasas on Thursday February 09, 2023 @12:08PM
(#34727218)
Yep, 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."
Re:Update to the .NET Language Strategy
by hardware2win on Thursday February 09, 2023 @12:18PM
(#34727418)
Of course it cannot access internals because youd break "sane oop"
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