如何獲取EntityKey的值?如何獲取EntityKey的值?
我嘗試:
串x = Customer.EntityKey.EntityKeyValues [0]。價值;
String x = Customer.EntityKey.EntityKeyValues [0] .Value.ToString();
String x = Customer.EntityKey.EntityKeyValues;
String x = Customer.EntityKey.EntityKeyValues.ToString();
結束於: 未將對象引用設置爲對象的實例。
請幫忙。謝謝
在哪一行?他們全部還是隻有一個? – ChrisF 2010-01-12 14:12:36
所以你的一個對象沒有被初始化到內存中......進入調試模式並檢查哪個對象爲空。 – 2010-01-12 14:13:06