AccountCollection.Add 方法

定义

重载

Add(Account)

将指定的 Account 添加到集合末尾。

Add(String)

使用指定的帐户类型创建一个新的 Account 对象,将其添加到集合的末尾并返回新创建的 Account。

Add(Account)

将指定的 Account 添加到集合末尾。

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

参数

item
Account

要添加的 Account

返回

Account 添加到集合时所在的从零开始的索引。

例外

  • 指定的项为空引用 (在 Visual Basic 中为 Nothing)。
  • 集合中已存在指定的项。
  • 指定的 Account 帐户类型在集合中无效。
  • 指定的名称 Account 在集合中无效。
  • 指定的 Account 兼容性级别在集合中无效。

适用于

Add(String)

使用指定的帐户类型创建一个新的 Account 对象,将其添加到集合的末尾并返回新创建的 Account。

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

参数

accountType
String

新的 Account 对象的帐户类型。

返回

新创建的 Account 对象。

例外

指定的帐户类型在集合中无效。

适用于