Edit

Share via


CollectionCodeDomSerializer.SerializeCollection Method

Definition

Serializes the given collection.

protected:
 virtual System::Object ^ SerializeCollection(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::CodeDom::CodeExpression ^ targetExpression, Type ^ targetType, System::Collections::ICollection ^ originalCollection, System::Collections::ICollection ^ valuesToSerialize);
protected virtual object SerializeCollection (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, System.CodeDom.CodeExpression targetExpression, Type targetType, System.Collections.ICollection originalCollection, System.Collections.ICollection valuesToSerialize);
protected virtual object? SerializeCollection (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, System.CodeDom.CodeExpression? targetExpression, Type targetType, System.Collections.ICollection originalCollection, System.Collections.ICollection valuesToSerialize);
abstract member SerializeCollection : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * System.CodeDom.CodeExpression * Type * System.Collections.ICollection * System.Collections.ICollection -> obj
override this.SerializeCollection : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * System.CodeDom.CodeExpression * Type * System.Collections.ICollection * System.Collections.ICollection -> obj
Protected Overridable Function SerializeCollection (manager As IDesignerSerializationManager, targetExpression As CodeExpression, targetType As Type, originalCollection As ICollection, valuesToSerialize As ICollection) As Object

Parameters

manager
IDesignerSerializationManager

The IDesignerSerializationManager to use during serialization.

targetExpression
CodeExpression

The CodeExpression that refers to the collection.

targetType
Type

The Type of the collection.

originalCollection
ICollection

The collection to serialize.

valuesToSerialize
ICollection

The values to serialize.

Returns

Serialized collection if the serialization process succeeded; otherwise, null.

Exceptions

manager, targetType, originalCollection, or valuesToSerialize is null.

Remarks

The CodeExpression that refers to the collection can be null.

Applies to

See also