我无法将 a 发送List<>
到文本框,我不确定是什么问题。我已经检查过,列表中实际上有值,并且它被正确地从类转移到这个块中。
编码:
public void Listtest(List<string> m_customers)
{
lstRegistry.Items.Clear();
for (int index = 0; index == m_customers.Count; index++)
{
lstRegistry.Items.Add(m_customers[index]);
}
}
发送List<>
class CustomManager
{
//private List<Customer> m_customers;
List<string> m_customers = new List<string>();
public void CreateNewString(string adresslist, string emaillist, string phonelist, string namelist)
{
MainForm strIn = new MainForm();
string newlist = string.Format("{0,-3} {1, -10} {2, -20} {3, -30}", namelist, phonelist, emaillist, adresslist);
m_customers.Add(newlist); //líst is created.
strIn.Listtest(m_customers);
}
}
我只是无法让它工作,我真的被卡住了。:/
感谢任何和所有的帮助和想法!!!
//问候