List.pack Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Serializes the current instance of the List class.
public:
cli::array <System::Object ^> ^ pack();
public object[] pack ();
member this.pack : unit -> obj[]
Public Function pack () As Object()
Returns
A container that contains the current instance of the List class.
Remarks
The container created by this method contains 3 elements before the first element from the list:
- A version number for the container
- An integer that identifies the data type of the list elements
- The number of elements in the list
If the elements in the list are objects, packing is performed by calling the pack method successively on each object to yield a subcontainer. The list can be retrieved from the packed container by using the List.create method.
The following example creates a list of records and passes in the packed list as a parameter for creating a new projReverseMarking object.
public boolean canClose()
{
ProjReverseMarking projReverseMarking;
boolean canClose;
List list;
canClose = super();
if (element.closedOk() && canClose)
{
List = new List(Types::Record);
while select tmpFrmVirtualLines
{
list.addEnd(tmpFrmVirtualLines);
}
projReverseMarking = new ProjReverseMarking(list.pack());
projReverseMarking.run();
}
return canClose;
}