UMD.HCIL.Piccolo.PNode.Clone C# (CSharp) Method

Clone() public method

The copy method copies this node and all of its descendents.
Note that copying is implemented in terms of c# serialization. See the serialization notes for more information.
public Clone ( ) : Object
return Object
		public virtual Object Clone() {
			BinaryFormatter bFormatter = new BinaryFormatter();
			bFormatter.SurrogateSelector = PUtil.FrameworkSurrogateSelector;
			MemoryStream stream = new MemoryStream();
			PStream pStream = new PStream(stream);
			pStream.WriteObjectTree(bFormatter, this);
			return (PNode)pStream.ReadObjectTree(bFormatter);
		}
		#endregion