public virtual Object Clone() { ParentObj newObj = this.MemberwiseClone() as ParentObj; newObj.myA = this.MyA; // not required, as value type (int) is automatically already duplicated. return(newObj); }
public virtual Object Clone() { ParentObj newObj = this.MemberwiseClone() as ParentObj; newObj.myA = theObj.MyA; return(newObj); }
private void LinkToParent() { IsNull = false; if (ParentObj != null) { ParentObj.LinkToParent(); } }
public IActionResult Get() { var wObj = new Age(25); var obj = new ParentObj("Tomas", wObj); string serializedObj = JsonConvert.SerializeObject(obj, Formatting.Indented); _log.Information(serializedObj); return(Ok()); }
private void _read() { _parent = new ParentObj(m_io, this, m_root); }
protected virtual CopyObject(ParentObj source, ParentObj dest) { dest.myA = source.myA; }
public override CopyObject(ChildObj source, ParentObj dest) { base.CopyObject(source, dest) dest.myB = source.myB; }
public virtual Object Clone() { var obj = new ParentObj(); CopyObject(this, obj); }