我從WCF提供一個List,並且客戶端接收DocTypes []。那裏沒有問題。WCF List <>在客戶端收到爲[],如何使用[]
目前的情況是,我的客戶端只接受100個DocType中的1,2個。將[100]濃縮爲2的最佳方式是什麼?
我有這個代碼用於標記用戶從網格中檢查的內容。
foreach (GridViewRow rowItem in gvDocTypes.Rows)
{
chk = (CheckBox)(rowItem.Cells[0].FindControl("chk1"));
if (chk.Checked)
DFO[y].Process = true;
y++;
}
這是數據收集模式:
我覺得[System.NonSerializedAttribute()]
private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
private int DocTypeGroupField;
private System.Guid DocTypeIDField;
private string DocTypeNameField;
private int DocTypeNumberField;
private string ErrorMsgField;
private bool ProcessField;
最佳做法是命名這個對象的克隆,並根據需要添加在通過網格我的迭代。我無法在新陣列中獲得我的出發點?
試過這樣:
Service.DocTypes dfo = new Service.DocTypes() ;
Service.DocTypes[] DFO = (Service.DocTypes[])Session["oDocTypes"];
Service.DocTypes[] oDFO = DFO.Clone();
我缺少什麼?
TIA
斯蒂芬