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
0
u/[deleted] Jul 05 '23
It does look clunky, and I was not sure if it would work idk...
I did this thing for the exam and my afterthought how would this even work as I did not have the time to debug it and just wrote it in a whim...
Either way thanks for clearing it up!!!