Aracılığıyla paylaş


KpiCollection.Add Method

Definition

Overloads

Add()

Creates a new Kpi object using a generated unique Name and identifier, adds it to the end of the collection and returns the new Kpi created.

Add(Kpi)

Adds the specified Kpi to the end of the collection.

Add(String)

Creates a new Kpi object using the specified name, adds it to the end of the collection and returns the new Kpi created.

Add(String, String)

Creates a new Kpi object using the specified name and identifier, adds it to the end of the collection and returns the new Kpi created.

Add()

Creates a new Kpi object using a generated unique Name and identifier, adds it to the end of the collection and returns the new Kpi created.

public Microsoft.AnalysisServices.Kpi Add ();
override this.Add : unit -> Microsoft.AnalysisServices.Kpi
Public Function Add () As Kpi

Returns

Kpi

The newly created Kpi object.

Applies to

Add(Kpi)

Adds the specified Kpi to the end of the collection.

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

Parameters

item
Kpi

The Kpi to be added.

Returns

The zero-based index at which the Kpi has been added to the collection.

Exceptions

  • The specified item is a null reference (Nothing in Visual Basic).
  • The specified item already esists in the collection.
  • The identifier of the specified Kpi is not valid in the collection.
  • The name of the specified Kpi is not valid in the collection.
  • The compatibility-level of the specified Kpi is not valid in the collection.

Applies to

Add(String)

Creates a new Kpi object using the specified name, adds it to the end of the collection and returns the new Kpi created.

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

Parameters

name
String

The Name for the new Kpi object.

Returns

Kpi

The newly created Kpi object.

Exceptions

The specified name is not valid in the collection.

Remarks

The identifier for the new Kpi object is generated based on the specified name.

Applies to

Add(String, String)

Creates a new Kpi object using the specified name and identifier, adds it to the end of the collection and returns the new Kpi created.

public Microsoft.AnalysisServices.Kpi Add (string name, string id);
override this.Add : string * string -> Microsoft.AnalysisServices.Kpi
Public Function Add (name As String, id As String) As Kpi

Parameters

name
String

The Name for the new Kpi object.

id
String

The identifier for the new Kpi object.

Returns

Kpi

The newly created Kpi object.

Exceptions

  • The specified name is not valid in the collection.
  • The specified identifier is not valid in the collection.

Applies to