Nettiers.AdventureWorks.Entities.VSalesPersonSalesByFiscalYearsBase.MakeCopyOf C# (CSharp) Method

MakeCopyOf() public static method

Returns a deep copy of the child collection object passed in.
public static MakeCopyOf ( object x ) : object
x object
return object
		public static object MakeCopyOf(object x)
		{
			if (x is ICloneable)
			{
				// Return a deep copy of the object
				return ((ICloneable)x).Clone();
			}
			else
				throw new System.NotSupportedException("Object Does Not Implement the ICloneable Interface.");
		}
		#endregion