1. XML Serializer. This is ASP. NET the way in which the Web Service SOAP requests are sent and accepted by default. Refers to the public properties and members of the serialized object.
2. SOAP Serializer. Dotnet Remoting uses the object transfer method. The objects being transmitted at this time require a Serializable flag.
3. Binaryserializer. Same as 2, it's just binary format.
code example:
Consider a person object with some attributes such as FullName, unique ID, and telephone (up to three. )
[Serializable]
public class Phone
{
private string _phonenumber= "";
private string _phonetype= "";
Public Phone (String phonetype,string phonenumner)
{
_phonenumber=phonenumner;
_phonetype=phonetype;
}
public string PHONEDESCP
{
Get
{
return string. Format ("{0}\t{1}", _phonetype,_phonenumber);
}
}
Public Phone ()
{
}
}
[Serializable]
public class Person
{
Public person ()
{
//
TODO: Add constructor logic here
//
}
Phone List assumes a maximum of three
Private Phone [] _allphones=new phone[3];
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.