因此,我在C#中創建了一個新工具,並且創建了一個名爲「Customer」的類,並且每個「Customer」都有一個員工子組,這是一個數組名。如何在我的課程中爲「客戶」設置此屬性?我在下面的'員工'是不正確的。我只是把它留在那裏作爲佔位符。 謝謝如何在自定義類中創建名稱陣列
public class Customer
{
public String Number { get; set; }
public String Name { get; set; }
public String Street { get; set; }
public String City { get; set; }
public String State { get; set; }
public String Zipcode { get; set; }
public string[] Employees = { get; set; }
}
你爲什麼不使用'List'呢? '列表' –
Prix
2014-09-11 04:29:46
我如何在代碼中正確寫入? – JokerMartini 2014-09-11 04:30:14
'public string [] Employees {get;組; }'? – 2014-09-11 04:31:16