C
C#4mo 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
Pobiega4mo 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
CgrevoxOP4mo ago
thank you so much!
Cattywampus
Cattywampus4mo ago
myClass.MyMethod() is called instance method
Want results from more Discord servers?
Add your server