共用方式為


IExplorerNodeCollection.AddFolder 方法

建立新的資料夾節點,並使用指定的委派來為新的資料夾節點建立子節點。

命名空間:  Microsoft.VisualStudio.SharePoint.Explorer
組件:  Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)

語法

'宣告
Function AddFolder ( _
    text As String, _
    folderIcon As Image, _
    createChildNodes As Action(Of IExplorerNode) _
) As IExplorerNode
IExplorerNode AddFolder(
    string text,
    Image folderIcon,
    Action<IExplorerNode> createChildNodes
)

參數

  • text
    型別:System.String
    隨新資料夾節點顯示的文字。

傳回值

型別:Microsoft.VisualStudio.SharePoint.Explorer.IExplorerNode
新的資料夾節點。

備註

當您使用 AddFolder 方法來建立資料夾節點時,您可以傳遞將會自動呼叫來建立新資料夾節點的子節點其 Action<T> 委派。 這個委派的參數是 IExplorerNode 物件,代表您可以新增子系的資料夾節點。 如需示範如何在建立資料夾節點時指定委派的逐步解說,請參閱 逐步解說:擴充伺服器總管以顯示 Web 組件

.NET Framework 安全性

請參閱

參考

IExplorerNodeCollection 介面

Microsoft.VisualStudio.SharePoint.Explorer 命名空間