-4
前3行代碼工作正常..C#初始化對象
如何在使用object initializer時執行相同操作?
// works
Customer MyCustomerx = new Customer();
MyCustomerx.Location[0].place = "New York";
MyCustomerx.Location[1].place = "France";
// problem here
List<Customer> MyCustomer = new List<Customer>
{
new Customer() { Name= "Me",Location[0].place = "New York" }
}
這個問題沒有說明的意義。 – 2014-10-22 10:28:41
給我們更多的信息。不工作是不夠的。 – Complexity 2014-10-22 10:29:39
如果從數據庫中拔出複雜性就容易多了。它就像一個人有很多電話..比如我有諾基亞,三星,你有聯想......我們如何在C#中構建poco?我有點測試,併發揮C#如何工作..從PHP背景..有很多的可能性,可以做到這一點,沒有錯誤.. – user2524126 2014-10-22 10:36:14