我無法將List<>
發送到文本框,我不確定問題所在。我已經檢查過,所以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);
}
}
我只是不能得到它的工作,我很堅持的其他類。 :/
感謝您的任何和所有幫助和想法!
//問候