On the Dynamic data type, we estimate that the actual use of more, not very unfamiliar. Summary of actual nails about yourself in the project:
1 fields in an anonymous object are read-only and cannot be assigned a value
2 dynamic types point to strongly typed instances, observing the intrinsic accessibility of properties
3 It might be a better approach to create anonymous objects at any time to dynamic types.
dynamic msg=null; try { var sninfos = bll_ Repairorderservice.getthevendorbuyproductssninfos (Id, mid); if (null != sninfos && sninfos.count > 0) { var results = new List<string> (); foreach (Var item in sninfos) { results. ADD (item. INTERNALSN); } msg = new {_s = 1, _d = results};} else {//msg. Status = Messagestatus.error; Msg. Results = null;msg = new {_s = 1, _d = string. Format ("Reseller code: {0}!", Id)};}
Another discussion on the dynamic keyword