語言

IndexAnnotation.MergeWith(Object) 方法

定義

將此註解與給定註解合併,並回傳包含合併索引的新註解。

public virtual object MergeWith(object other);
abstract member MergeWith : obj -> obj
override this.MergeWith : obj -> obj
Public Overridable Function MergeWith (other As Object) As Object

參數

other
Object

註解要和這個合併。

傳回

一個包含兩個註解索引的新註解合併。

實作

例外狀況

另一種註解包含與本註解中索引不相容的索引。

備註

每個索引註解最多包含一個 IndexAttribute 帶有名稱的註解。 合併後的註解會同時包含來自此註解與另一個註解的 IndexAttributes。 如果兩個註解都包含同名的 IndexAttribute,則合併後的註解會包含一個同名的 IndexAttribute。

適用於