Share via


AccountCollection.Add Method

Definition

Overloads

Add(Account)

Adds the specified Account to the end of the collection.

Add(String)

Creates a new Account object using the specified account type, adds it to the end of the collection and returns the new Account created.

Add(Account)

Adds the specified Account to the end of the collection.

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

Parameters

item
Account

The Account to be added.

Returns

The zero-based index at which the Account 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 account type of the specified Account is not valid in the collection.
  • The name of the specified Account is not valid in the collection.
  • The compatibility-level of the specified Account is not valid in the collection.

Applies to

Add(String)

Creates a new Account object using the specified account type, adds it to the end of the collection and returns the new Account created.

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

Parameters

accountType
String

The account type for the new Account object.

Returns

The newly created Account object.

Exceptions

The specified account type is not valid in the collection.

Applies to