Click here to Skip to main content
15,878,048 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,

I have Class A with ButtonClick Event, i want to access this Clickevent in another class, is it possible without giving Instance of Class A?

please let me know thanks
Posted

1 solution

Is not possible, because the event is a method that belong the class A, so in order to access a non static member of any class, you must have an object of that class and that member have to be public (if your class is not inherit the class A, otherwise could also be protected or internal)!
 
Share this answer
 
Comments
GagKumar 27-Mar-14 5:46am    
Thank you very much for your answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900