Y
Yogi_Bear_79
Self Taught here so please bear with me.
I have the labelRestrictSites as private on the MainForm.cs. I then access
the labelRestrictSites.Text thru the public string LabelRestrictSites from
another class. So
when I add labelRestrictSites.refresh code to my class I get an error
because the labelRestrictSites
is private. How would I refresh?
****************************************
mainform.cs
private System.Windows.Forms.Label labelRestrictSites;
public string LabelRestrictSites
{
get { return labelRestrictSites.Text; }
set { labelRestrictSites.Text = value; }
}//end property
********************************************
RestircedSites.cs
private void AddRestrictedSites()
{
foreach(string x in strResSitesList)
{
MainForm frm = (MainForm)MainForm.ActiveForm;
frm.LabelRestrictSites = ((iTotal += 1).ToString());
}
}
I have the labelRestrictSites as private on the MainForm.cs. I then access
the labelRestrictSites.Text thru the public string LabelRestrictSites from
another class. So
when I add labelRestrictSites.refresh code to my class I get an error
because the labelRestrictSites
is private. How would I refresh?
****************************************
mainform.cs
private System.Windows.Forms.Label labelRestrictSites;
public string LabelRestrictSites
{
get { return labelRestrictSites.Text; }
set { labelRestrictSites.Text = value; }
}//end property
********************************************
RestircedSites.cs
private void AddRestrictedSites()
{
foreach(string x in strResSitesList)
{
MainForm frm = (MainForm)MainForm.ActiveForm;
frm.LabelRestrictSites = ((iTotal += 1).ToString());
}
}