A
ArunDhaJ
Hi,
I've a class with string and int datatypes. When trying to serialize
this class, it is missing to serialize the int field.
the class definition as follows:
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl",
"2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://
myns.com/")]
public partial class myclass {
private string nameField;
private int idField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute
(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string name {
get {
return this.nameField;
}
set {
this.nameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute
(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public int id {
get {
return this.idField;
}
set {
this.idField= value;
}
}
}
when serializing the above class, the idField is getting missed. only
nameField is getting serialized.
I'm new to serialization, please help me whether I'm missing any
attributes?
Regards,
ArunDhaJ
I've a class with string and int datatypes. When trying to serialize
this class, it is missing to serialize the int field.
the class definition as follows:
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl",
"2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://
myns.com/")]
public partial class myclass {
private string nameField;
private int idField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute
(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string name {
get {
return this.nameField;
}
set {
this.nameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute
(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public int id {
get {
return this.idField;
}
set {
this.idField= value;
}
}
}
when serializing the above class, the idField is getting missed. only
nameField is getting serialized.
I'm new to serialization, please help me whether I'm missing any
attributes?
Regards,
ArunDhaJ