共用方式為


PerspectiveAttributeCollection.Add 方法

定義

多載

Add(PerspectiveAttribute)

將指定的 PerspectiveAttribute 新增至集合的結尾。

Add(String)

使用指定的 AttributeID,建立新的 PerspectiveAttribute 物件,然後將其新增至集合結尾,並傳回新建立的 PerspectiveAttribute。

Add(PerspectiveAttribute)

將指定的 PerspectiveAttribute 新增至集合的結尾。

public int Add (Microsoft.AnalysisServices.PerspectiveAttribute item);
override this.Add : Microsoft.AnalysisServices.PerspectiveAttribute -> int
Public Function Add (item As PerspectiveAttribute) As Integer

參數

傳回

以零起始的索引,其為 PerspectiveAttribute 新增至集合的位置。

例外狀況

  • 指定的項目為 Null 參考 (Visual Basic 中的 Nothing)。
  • 指定的項目已存在於集合中。
  • 指定 PerspectiveAttribute 之 的 AttributeID 在集合中無效。
  • 指定的名稱 PerspectiveAttribute 在集合中無效。
  • 指定 PerspectiveAttribute 之 的相容性層級在集合中無效。

適用於

Add(String)

使用指定的 AttributeID,建立新的 PerspectiveAttribute 物件,然後將其新增至集合結尾,並傳回新建立的 PerspectiveAttribute。

public Microsoft.AnalysisServices.PerspectiveAttribute Add (string attributeId);
override this.Add : string -> Microsoft.AnalysisServices.PerspectiveAttribute
Public Function Add (attributeId As String) As PerspectiveAttribute

參數

attributeId
String

PerspectiveAttribute 物件的 AttributeID。

傳回

新建立的 PerspectiveAttribute 物件。

例外狀況

指定的 AttributeID 在集合中無效。

適用於