www.pudn.com > SerializationMobile.rar > Customer.cs, change:2007-04-18,size:1331b


´╗┐using System; 
using System.Collections.Generic; 
using System.Text; 
 
namespace BusinessEntities 
{ 
    [CompactFormatter.Attributes.Serializable()] 
    public class Customer 
    { 
        public Customer() 
        { 
        } 
 
        private int id; 
        public int ID 
        { 
            get { return id; } 
            set { id = value; } 
        } 
 
        private string name; 
        public string Name 
        { 
            get { return name; } 
            set { name = value; } 
        } 
 
        private string phone; 
        public string Phone 
        { 
            get { return phone; } 
            set { phone = value; } 
        } 
 
        private string address; 
        public string Address 
        { 
            get { return address; } 
            set { address = value; } 
        } 
 
        public override bool Equals(object obj) 
        { 
            if (!obj.GetType().Equals(typeof(Customer))) 
            { 
                return false; 
            } 
            else 
            { 
                Customer answer = (Customer)obj; 
                return (answer.ID == ID  
                    && answer.Name == Name  
                    && answer.Phone == Phone  
                    && answer.Address == Address); 
            } 
        } 
    } 
}