Click here to Skip to main content
15,916,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i am new for .net i have one doubt when a button is clicked under an event is generate right?we are writing the code under that event but my doudt is instead of protected keyword can i put public or protected interal is there any possible to write
please tell me
Posted

1 solution

Yes - you can change the access modifier if you need to.

However, you probably shoudln't - making it more publicly available is not normally a good idea, as it can fix the design of your form. Once it is possible that it has been used externally, you have to assume that it can't easily be changed.
Instead, have it call a method with the required access, and let the outside world use that as well.
 
Share this 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