C
C#3mo ago
Cgrevox

how to call another method

ok, so, I'll post a screen to explain better: how can i call a method that is on another file? or maybe i'm wrong and the question is hot to call a file. if anyone knows the solution please tell me. i want to make things better by making other files.
No description
3 Replies
Pobiega
Pobiega3mo ago
there are two ways, depends on if the other method is static or not static: ClassName.MethodName(); non-static: create an instance of the class var x = new ClassName(); call method: x.MethodName();
Cgrevox
CgrevoxOP3mo ago
thank you so much!
Cattywampus
Cattywampus3mo ago
myClass.MyMethod() is called instance method
Want results from more Discord servers?
Add your server