示例#1
0
        /// <summary cref="IEncodeable.IsEqual(IEncodeable)" />
        public virtual bool IsEqual(IEncodeable encodeable)
        {
            if (Object.ReferenceEquals(this, encodeable))
            {
                return(true);
            }

            DataType4 value = encodeable as DataType4;

            if (value == null)
            {
                return(false);
            }

            if (!Utils.IsEqual(m_int32Field, value.m_int32Field))
            {
                return(false);
            }
            if (!Utils.IsEqual(m_floatField, value.m_floatField))
            {
                return(false);
            }
            if (!Utils.IsEqual(m_byteField, value.m_byteField))
            {
                return(false);
            }

            return(true);
        }
示例#2
0
        /// <summary cref="ICloneable.Clone" />
        public virtual object Clone()
        {
            DataType4 clone = (DataType4)this.MemberwiseClone();

            clone.m_int32Field = (int)Utils.Clone(this.m_int32Field);
            clone.m_floatField = (float)Utils.Clone(this.m_floatField);
            clone.m_byteField  = (byte)Utils.Clone(this.m_byteField);

            return(clone);
        }