共用方式為


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

為資料流的項目和其屬性的指定版本與會覆寫目前的項目。

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

Syntax

'宣告
Public Sub CopyFrom ( _
    sourceUrl As String, _
    properties As Hashtable, _
    stream As Byte() _
)
'用途
Dim instance As SPListItem
Dim sourceUrl As String
Dim properties As Hashtable
Dim stream As Byte()

instance.CopyFrom(sourceUrl, properties, _
    stream)
public void CopyFrom(
    string sourceUrl,
    Hashtable properties,
    byte[] stream
)

參數

  • sourceUrl
    Type: System.String

    要複製的項目版本的 URL。

    注意事項注意事項

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

  • stream
    Type: []

    二進位資料流複製項目。

Exceptions

Exception Condition
ArgumentException

sourceUrl是 null 或空白。

-或-

properties或stream是 null 。

NotSupportedException

SPListItem物件有外部資料來源。

備註

以位於sourceUrl的項目和它當做資料流properties參數所指定的屬性,這個方法會覆寫目前的清單項目。

CopyFrom方法會重設為目的地項目上的CopySource屬性sourceUrl參數的值。

請參閱

參照

SPListItem class

SPListItem members

CopyFrom overload

Microsoft.SharePoint namespace