PBCaGw.DataPacket.Clone C# (CSharp) Method

Clone() public method

Clone this packet, creating an exact copy. As the clone function is an implementation of IClonable it must return an object.
public Clone ( ) : object
return object
        public object Clone()
        {
            DataPacket p = DataPacket.Create(this.BufferSize);
            Buffer.BlockCopy(this.Data, this.Offset, p.Data, 0, this.BufferSize);
            p.bufferSize = this.bufferSize;
            p.Sender = this.Sender;
            p.Destination = this.Destination;
            p.Kind = this.Kind;
            p.Chain = this.Chain;
            return p;
        }