Condividi tramite


SPUserStorageCollection Class

Represents a collection of SPUserStorage objects used to maintain storage information for all users of a Web Part Page.

Inheritance Hierarchy

System.Object
  System.Collections.ReadOnlyCollectionBase
    Microsoft.SharePoint.SPUserStorageCollection

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Class SPUserStorageCollection _
    Inherits ReadOnlyCollectionBase
'Usage
Dim instance As SPUserStorageCollection
public class SPUserStorageCollection : ReadOnlyCollectionBase

Remarks

Use the LengthByUser property of the SPFile class to return a collection of user-storage objects that contain information about each user of a Web Part Page. Use an indexer to return a single user-storage object from the collection. For example, if the collection is assigned to a variable named myUserStorages, use myUserStorages[index] in C#, or myUserStorages(index) in Microsoft Visual Basic, where index is the index number of the user-storage object in the collection. You can also use a foreach statement (For Each in Visual Basic) to iterate through the collection and return the user-storage objects.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPUserStorageCollection Members

Microsoft.SharePoint Namespace