共用方式為


ActiveDirectorySubnetCollection.Add(ActiveDirectorySubnet) 方法

定義

將指定 ActiveDirectorySubnet 物件附加到這個集合中。

public:
 int Add(System::DirectoryServices::ActiveDirectory::ActiveDirectorySubnet ^ subnet);
public int Add (System.DirectoryServices.ActiveDirectory.ActiveDirectorySubnet subnet);
member this.Add : System.DirectoryServices.ActiveDirectory.ActiveDirectorySubnet -> int
Public Function Add (subnet As ActiveDirectorySubnet) As Integer

參數

subnet
ActiveDirectorySubnet

要附加到此集合的 ActiveDirectorySubnet 物件。

傳回

要附加到這個集合的 ActiveDirectorySubnet 之以零起始的索引。

例外狀況

呼叫基礎目錄服務時,發生錯誤。

物件已存在於集合中。

subnetnull

ActiveDirectorySubnet 物件尚未儲存在 Active Directory 網域服務存放區中。

適用於

另請參閱