J
jp
Hi.
I'm new to C#, but I've been programing in C++ and VB for years.
I wrote a public method inside a form:
public bool bConnect(string strServerName, string strDBName,
string strUser, string strPassword)
{
return (true);
}
The thing is that there is no way to call it from outside the form. I
can't even see it with the autocomplete feature:
private void aplicacionesToolStripMenuItem_Click(object
sender, EventArgs e)
{
Form frmApps = new clsFormApps();
frmApps.bConnect("", "", "", ""); -> FAILS,
with error Error...
'System.Windows.Forms.Form' does not contain a definition for
'bConnect' and no extension method 'bConnect' accepting a first
argument of type 'System.Windows.Forms.Form' could be found (are you
missing a using directive or an assembly reference?) D:\tools
\ConfigPAL 2009\ConfigPAL\ConfigPAL\clsFormMain.cs 59 21 ConfigPAL
Thank you for your help.
I'm new to C#, but I've been programing in C++ and VB for years.
I wrote a public method inside a form:
public bool bConnect(string strServerName, string strDBName,
string strUser, string strPassword)
{
return (true);
}
The thing is that there is no way to call it from outside the form. I
can't even see it with the autocomplete feature:
private void aplicacionesToolStripMenuItem_Click(object
sender, EventArgs e)
{
Form frmApps = new clsFormApps();
frmApps.bConnect("", "", "", ""); -> FAILS,
with error Error...
'System.Windows.Forms.Form' does not contain a definition for
'bConnect' and no extension method 'bConnect' accepting a first
argument of type 'System.Windows.Forms.Form' could be found (are you
missing a using directive or an assembly reference?) D:\tools
\ConfigPAL 2009\ConfigPAL\ConfigPAL\clsFormMain.cs 59 21 ConfigPAL
Thank you for your help.