コード例 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            NaceRegionData other = (NaceRegionData)obj;

            return(this.naceId == other.naceId && this.regionId == other.regionId && this.year == other.year);
        }
コード例 #2
0
 public NaceRegionData merge(NaceRegionData other)
 {
     if (this.Equals(other))
     {
         List <System.Reflection.PropertyInfo> props = getDataProperties();
         foreach (System.Reflection.PropertyInfo prop in props)
         {
             object value = prop.GetValue(other);
             if (value != null)
             {
                 prop.SetValue(this, value);
             }
         }
     }
     return(this);
 }