passing click button event to different c# file -
i've added new cs file project (some function), , want start running when click button on main form. these 2 different files. used same namespace in both of these files, how pass click button event new cs file?
thx.
declare method in sec class static , phone call event.
void clickevent (...) { secondclass.staticdesiredmethod(...); }
instantiate sec class , phone call method.
void clickevent (...) { var secondclass = new secondclass(); secondclass.desiredmethod(); }
c#
No comments:
Post a Comment