stcheng
Tue Jul 10 23:52:11 CDT 2007
Hi Lucius,
I think the problem you met here is due to the attribute you used.
"SoapIgnoreAttribute" is designed for decorating classes that will be
serialized through SoapFormatter:
#SoapFormatter Class
http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.format
ters.soap.soapformatter(VS.71).aspx
actually, both SoapFormatter and BinaryFormatter are used for binary
serialization. For XML serialization, you should use "XmlIgnoreAttribute"
to exclude property/fields that you do not want to serialize:
#XmlIgnoreAttribute Class
http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlignorea
ttribute.aspx
e.g.
>>>>>>>>>>>>>>>>>>>>>
[XmlIgnore()]
public int Property2
{
get { return _prop2; }
set {
_prop2 = value;
}
}
<<<<<<<<<<<<<<<<<<<<<<
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.