public ClsLogs(Form frmmain) {
_frmmain = frmmain;
}
public void Logs(string ex)
{
ListBox ls= _frmmain.Controls["listbox1"] as ListBox;
if (ls != null) ls.Items.Add("Log->" + ex);
}
i dont have any idea about it;i think my path is not true;but i try it:
ListBox ls=null;
ls= _frmmain.Controls["listbox1"] as ListBox;
if (ls != null) ls.Items.Add("Log->" + ex);
New contributor
hesam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.