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.
3 Replies
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();
thank you so much!
myClass.MyMethod()
is called instance method