Share via


Visual Basic Reference

Contents Property

See Also    Example    Applies To

Returns or sets a byte array representing the contents of a PropertyBag object.

Remarks

The Contents property is used to store or retrieve the contents of a PropertyBag object to or from an external storage such as a text file, a cell in a spreadsheet, a message field, or a structured storage. An object stored in this manner can be retrieved and reused without using the New keyword. The Contents property must be passed as a byte array; attempting to assign to or from any other data type will result in a run time error.

This property only applies to a PropertyBag declared As PropertyBag; it does not apply to a PropertyBag object contained in a UserControl or UserDocument.