static public string FormatString(Stream resp) { UFileError obj = (UFileError)JsonObject(resp); if (obj == null) { return(""); } return(string.Format("RetCode: {0} ErrMsg: {1}", obj.GetRetCode(), obj.GetErrMsg())); }
static public Object JsonObject(Stream resp) { if (resp == null) { return(null); } DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(UFileError)); UFileError obj = (UFileError)ser.ReadObject(resp); return(obj); }