Click here to Skip to main content
16,021,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear all,

I have a little confusion regarding the use of access modifier visibility level. the situation is like below:

I have a timer control (tmr1, as private mode) in Enable=False mode, in a form (form1). Now I want to enable that tmr1 depending upon a button1_Click event of another form say form2. So is it safe to make that tmr1's access specifier internal and make it enable from the form2??? :confused:
Posted

Rather than do that it would be better to keep the timer member private and to add an internal method:

C#
internal void EnableTimer(){...}
 
Share this answer
 
v2
Yes. You may safely make it internal.
 
Share this answer
 
Comments
Toli Cuturicu 6-Nov-10 15:39pm    
Wow! An accepted answer with a 2 vote! That's strange.

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