Folder 类
Represents a folder on a SharePoint Web site.
继承层次结构
System.Object
Microsoft.SharePoint.Client.ClientObject
Microsoft.SharePoint.Client.Folder
命名空间: Microsoft.SharePoint.Client
程序集: Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中); Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中) Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)
语法
声明
Public Class Folder _
Inherits ClientObject
用法
Dim instance As Folder
public class Folder : ClientObject
备注
The UniqueContentTypeOrder property is not included in the default scalar property set for this type.
示例
This code example lists the folders on the current website.
using System;
using Microsoft.SharePoint.Client;
namespace Microsoft.SDK.SharePointFoundation.Samples
{
class FolderExample
{
static void Main()
{
string siteUrl = "http://MyServer/sites/MySiteCollection";
ClientContext clientContext = new ClientContext(siteUrl);
Web site = clientContext.Web;
FolderCollection collFolder = site.Folders;
clientContext.Load(collFolder);
clientContext.ExecuteQuery();
Console.WriteLine("The current site contains the following folders:\n\n");
foreach (Folder myFolder in collFolder)
Console.WriteLine(myFolder.Name);
}
}
}
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。