Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
is it a problem to call a void function in the 2nd form using 1st form? i cannot start it immediately because of there are certain condition need to go through first before that void function can appear..
Posted

1 solution

Yes,
First of that you have to know that 
A void method by default is Private.
An you can not access a Private method from Another class
So you have to declare as Public
Like:
Public void YourMethodName()
{
//Input your data
}
 
Share this answer
 
Comments
Member 10474752 27-Mar-14 6:38am    
thank you sir for kind explaining.. i solve my problem.. :)
[no name] 27-Mar-14 7:42am    
welcome :)

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