共用方式為


ISharePointProjectItemFileCollection.AddFromFile 方法

將指定的檔案加入至專案項目檔案集合。

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

語法

'宣告
Function AddFromFile ( _
    fileName As String _
) As ISharePointProjectItemFile
ISharePointProjectItemFile AddFromFile(
    string fileName
)

參數

  • fileName
    型別:System.String
    要加入的檔案名稱。這應該是 SharePoint 專案項目資料夾內檔案的路徑。

傳回值

型別:Microsoft.VisualStudio.SharePoint.ISharePointProjectItemFile
加入至集合中的專案項目檔案。

.NET Framework 安全性

請參閱

參考

ISharePointProjectItemFileCollection 介面

Microsoft.VisualStudio.SharePoint 命名空間