Share via


AnnotationCollection.Add Method

Definition

Overloads

Add(Annotation)

Adds the specified Annotation to the end of the collection.

Add(String, String)

Creates a new Annotation object using the name and value provided, adds it to the collection and returns the new Annotation object created.

Add(Annotation)

Adds the specified Annotation to the end of the collection.

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

Parameters

item
Annotation

The Annotation to be added.

Returns

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

Exceptions

The specified item is a null reference (Nothing in Visual Basic).

The specified item's name is a null reference (Nothing in Visual Basic).

  • The specified item already esists in the collection.
  • The specified item belongs to another collection.
  • The collection already contains an item with the same name as the specified item.

Applies to

Add(String, String)

Creates a new Annotation object using the name and value provided, adds it to the collection and returns the new Annotation object created.

public Microsoft.AnalysisServices.Annotation Add (string name, string value);
member this.Add : string * string -> Microsoft.AnalysisServices.Annotation
Public Function Add (name As String, value As String) As Annotation

Parameters

name
String

The Name for the new Annotation object.

value
String

The Value for the new Annotation object.

Returns

The newly created Annotation object.

Exceptions

The specified name is a null reference (Nothing in Visual Basic).

The collection already contains an item with the same name as the specified name.

Applies to