AnnotationCollection.Insert Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Insert(Int32, Annotation) |
Inserts the specified Annotation to the collection at the specified index. |
Insert(Int32, String, String) |
Creates a new Annotation object using the name and value provided, inserts it to the collection at the specified index, and returns the new Annotation object created. |
Insert(Int32, Annotation)
Inserts the specified Annotation to the collection at the specified index.
public void Insert (int index, Microsoft.AnalysisServices.Annotation item);
member this.Insert : int * Microsoft.AnalysisServices.Annotation -> unit
Public Sub Insert (index As Integer, item As Annotation)
Parameters
- index
- Int32
The zero-based index at which the Annotation is inserted.
- item
- Annotation
The Annotation to be inserted.
Exceptions
The specified index is not a valid value (less than zero or bigger then the total number of elements).
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
Insert(Int32, String, String)
Creates a new Annotation object using the name and value provided, inserts it to the collection at the specified index, and returns the new Annotation object created.
public Microsoft.AnalysisServices.Annotation Insert (int index, string name, string value);
member this.Insert : int * string * string -> Microsoft.AnalysisServices.Annotation
Public Function Insert (index As Integer, name As String, value As String) As Annotation
Parameters
- index
- Int32
The zero-based index at which the Annotation is inserted.
- 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 index is not a valid value (less than zero or bigger then the total number of elements).
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.