SPSite 构造函数 (Guid)
Initializes a new instance of the SPSite class based on the specified ID for a site collection.
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Sub New ( _
id As Guid _
)
用法
Dim id As Guid
Dim instance As New SPSite(id)
public SPSite(
Guid id
)
参数
id
类型:System.GuidThe ID that specifies the site collection.
异常
异常 | 条件 |
---|---|
FileNotFoundException | The site collection could not be found. |
备注
警告
This constructor is allowed in 沙盒解决方案. In that case, the value of the id parameter must resolve to the value of the ID property of the parent site collection in which the sandboxed solution is deployed. If the value of the id parameter resolves to the value of the ID property of any other site collection, the constructor throws an exception because a 沙盒解决方案 is not allowed to access any SharePoint objects outside of its hosting site collection.