共用方式為


ISharePointProjectItemFileCollection.AddFromFileCopy 方法 (String, String)

將指定檔案的複本做為專案項目檔案加入至指定的子目錄。 這個檔案隨即加入至 SharePoint 專案項目資料夾。

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

語法

'宣告
Function AddFromFileCopy ( _
    fileName As String, _
    subdirectory As String _
) As ISharePointProjectItemFile
ISharePointProjectItemFile AddFromFileCopy(
    string fileName,
    string subdirectory
)

參數

  • subdirectory
    型別:System.String
    SharePoint 專案項目資料夾中的子目錄,可在其中加入檔案。

傳回值

型別:Microsoft.VisualStudio.SharePoint.ISharePointProjectItemFile
加入至專案項目資料夾中專案項目檔案的執行個體。

.NET Framework 安全性

請參閱

參考

ISharePointProjectItemFileCollection 介面

AddFromFileCopy 多載

Microsoft.VisualStudio.SharePoint 命名空間