// Returns a new object instance that is a memberwise copy of this // object. This is always a shallow copy of the instance. The method is protected // so that other object may only call this method on themselves. It is intended to // support the ICloneable interface. protected unsafe object MemberwiseClone() { object clone = RuntimeHelpers.AllocateUninitializedClone(this); // copy contents of "this" to the clone nuint byteCount = RuntimeHelpers.GetRawObjectDataSize(clone); ref byte src = ref this.GetRawData();