[Serializable]
[DesignerCategory("code")]
[GeneratedCode("System.Xml", "2.0.50727.42")]
[DebuggerStepThrough]
public class balanceApiRequestType
{
public balanceApiRequestType(); [XmlChoiceIdentifier("ItemsElementName")]
[XmlElement("memberCode", typeof(String))]
[XmlElement("acctType", typeof(Int32))]
[XmlElement("memberAcctCode", typeof(String))]
public object[] Items { get; set; }
[XmlIgnore]
[XmlElement("ItemsElementName")]
public ItemsChoiceType[] ItemsElementName { get; set; }
public string merchantMemberCode { get; set; }
}[Serializable]
[GeneratedCode("System.Xml", "2.0.50727.42")]
public enum ItemsChoiceType
{
acctType = 0,
memberAcctCode = 1,
memberCode = 2,
}现在问题:不知如何调用balanceApiRequestType这个类,将值赋值进去,求那位大神帮忙看看,谢谢 我现在写的是
baquery.balanceApiRequestType balanceApiRequestType = new baquery.balanceApiRequestType(); Object[] ob = new Object[3]; ob[0] = memberCode;
ob[1] = acctType;
ob[2] = memberAcctCode; baquery.ItemsChoiceType[] ItemsChoiceType = new baquery.ItemsChoiceType[3];
ItemsChoiceType[0] = baquery.ItemsChoiceType.@acctType;
ItemsChoiceType[1] = baquery.ItemsChoiceType.@memberAcctCode;
ItemsChoiceType[2] = baquery.ItemsChoiceType.@memberCode;
//ob = ItemsChoiceType;
balanceApiRequestType.Items = ob;
balanceApiRequestType.ItemsElementName =ItemsChoiceType;
balanceApiRequestType.merchantMemberCode = merchantMemberCode;错误信息:生成 XML 文档时出错。
ItemsElementName 的值与 System.int 的类型不匹配;需要将其设置为 com.w_99bill.www.ItemsChoiceType.@acctType。
解决方案 »
- 又是配置文件问题,真心找不到错误,求帮忙!感激不尽,这个问题困扰我好久了!
- 如何获取当前线程的ID(唯一标识符)
- 创建一个类并且调用该怎么写
- C# 打印水晶报表,报表设置成横向,打印出来的还字横向了,但是纸张还是纵向
- HtmlElement.OuterHtml将原字符格式改变,如何知道它的原字符串?
- 请问用ActiveReports,如何动态显示报表中的数据列数,也就是根据数据库字段的数目而定?
- 在PDA端无线编程的问题?~~
- C# 如何将HTML转换成xml
- 关于单例模式和多线程的问题
- 看看这个锯齿数组声明有没有错
- 如果事件触发的太频繁。事件响应函数会不会来不及执行完就执行下一个??
- 使用企业库EnterpriseLibrary.Data.dll如何解密数据库连接
ob[1] = acctType;
我传递的这个是一个int类型的数值,这个才是悲剧的地方。