Accessing a method
C#
2
Posts
2
Posters
0
Views
1
Watching
-
hi, How can I access a method of one from to another form. With Regards Prasad:)
-
hi, How can I access a method of one from to another form. With Regards Prasad:)
If the method is
public
and you have access to an instance of the form then make a call like the following one:myForm.myMethod()
if you haven't access to an instance of the form, then you can call only
static
(and of coursepublic
) methods.If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.