Click or drag to resize
DataExtensionsCopyTo Method

Note: This API is now obsolete.

Copies the data of specified columns of the source object to the target object.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 9.0.0
Syntax
C#
[ObsoleteAttribute("This method is obsolete. Loop through the copied fields and set their value instead.")]
public static void CopyTo(
	this IDataContainer obj,
	IDataContainer target,
	IEnumerable<string> columns = null,
	IEnumerable<string> excludeColumns = null
)

Parameters

obj
Type: CMS.BaseIDataContainer
Source object
target
Type: CMS.BaseIDataContainer
Target object
columns (Optional)
Type: System.Collections.GenericIEnumerableString
List of columns to copy, if null, all columns will be copied
excludeColumns (Optional)
Type: System.Collections.GenericIEnumerableString
List of columns to exclude

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataContainer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also