共用方式為


CollectionCodeDomSerializer.SerializeCollection 方法

定義

將指定的集合序列化。

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

參數

manager
IDesignerSerializationManager

供序列化期間使用的 IDesignerSerializationManager

targetExpression
CodeExpression

CodeExpression參考集合的 。

targetType
Type

集合的 Type

originalCollection
ICollection

要序列化的集合。

valuesToSerialize
ICollection

要序列化的值。

傳回

如果序列化程序成功,則將集合序列化;否則為 null

例外狀況

managertargetTypeoriginalCollectionvaluesToSerializenull

備註

CodeExpression參考集合的 可以是 null

適用於

另請參閱