共用方式為


SPListItem.Copy method (String, String, Hashtable, Byte[])

將指定的項目和其屬性當做資料複製到指定的目的地。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Sub Copy ( _
    sourceUrl As String, _
    destinationUrl As String, _
    properties As Hashtable, _
    stream As Byte() _
)
'用途
Dim sourceUrl As String
Dim destinationUrl As String
Dim properties As Hashtable
Dim stream As Byte()

SPListItem.Copy(sourceUrl, destinationUrl, _
    properties, stream)
public static void Copy(
    string sourceUrl,
    string destinationUrl,
    Hashtable properties,
    byte[] stream
)

參數

  • sourceUrl
    Type: System.String

    要複製,用來設定CopySource項目的欄位複製之項目的來源位置的 URL。

  • destinationUrl
    Type: System.String

    項目的 URL。

    注意事項注意事項

    目的地 URL 必須位於相同的伺服器執行的程式碼。此複製作業不會在遠端伺服器上複製的 url。

  • stream
    Type: []

    二進位資料流為項目。

Exceptions

Exception Condition
ArgumentException

sourceUrl或destinationUrl是 null 或空白。

-或-

properties或stream是 null 。

備註

此方法會複製清單項目位於sourceUrl和它當做資料流properties參數所指定的屬性到destinationUrl參數所指定的目的地位置。

請參閱

參照

SPListItem class

SPListItem members

Copy overload

Microsoft.SharePoint namespace