共用方式為


IUpdatable.AddReferenceToCollection 方法

將指定的值加入到集合中。

命名空間:  System.Data.Services
組件:  Microsoft.Data.Services (在 Microsoft.Data.Services.dll 中)

語法

'宣告
Sub AddReferenceToCollection ( _
    targetResource As Object, _
    propertyName As String, _
    resourceToBeAdded As Object _
)
'用途
Dim instance As IUpdatable
Dim targetResource As Object
Dim propertyName As String
Dim resourceToBeAdded As Object

instance.AddReferenceToCollection(targetResource, _
    propertyName, resourceToBeAdded)
void AddReferenceToCollection(
    Object targetResource,
    string propertyName,
    Object resourceToBeAdded
)
void AddReferenceToCollection(
    Object^ targetResource, 
    String^ propertyName, 
    Object^ resourceToBeAdded
)
abstract AddReferenceToCollection : 
        targetResource:Object * 
        propertyName:string * 
        resourceToBeAdded:Object -> unit 
function AddReferenceToCollection(
    targetResource : Object, 
    propertyName : String, 
    resourceToBeAdded : Object
)

參數

  • targetResource
    型別:System.Object
    定義屬性的目標物件。
  • propertyName
    型別:System.String
    應加入資源的目標集合屬性名稱。
  • resourceToBeAdded
    型別:System.Object
    不透明的物件,表示要加入的資源。

請參閱

參考

IUpdatable 介面

System.Data.Services 命名空間