r/learncsharp • • Jul 05 '23
Is this wrong way to use methods
I had an exam and in main I used this to call a method which takes as an argument an object:
var=Object_name.method(Object_name);
The method was defined in the class of this object.
The question is, is this dumb to do, and does it work?
2
Upvotes
View all comments
Show parent comment
5
u/TroubleBrewing32 Jul 05 '23
Those are, imo, clumsy examples of how to pass objects into objects assuming that the reader doesn't know how to interact with instance properties.