Поделиться через


SPTimeZoneCollection Class

Represents a collection of SPTimeZone objects.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPTimeZoneCollection

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class SPTimeZoneCollection _
    Inherits SPBaseCollection

Dim instance As SPTimeZoneCollection
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPTimeZoneCollection : SPBaseCollection

Remarks

Use the TimeZones property of either the SPRegionalSettings or SPGlobalAdmin class to return the collection of time zones used in the site or in the deployment of Windows SharePoint Services. Use an indexer to return a single time zone from the collection. For example, if the collection is assigned to a variable named myTimeZone, use myTimeZone[index] in Microsoft Visual C#, or myTimeZone(index) in Microsoft Visual Basic, where index is the index number of the time zone in the collection.

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

SPTimeZoneCollection Members

Microsoft.SharePoint Namespace