Remove(Index: Integer): Boolean;
Index is a domain index in the collection.
The Remove method removes a domain from the collection by its index. Returns the True value, if domain with the Index index was successfully removed.
Executing the example requires a form, a button named Button1 on this form.
Sub Button1OnClick(Sender: Object; Args: IEventArgs);
Var
MB: IMetabase;
Sec: IMetabaseSecurity;
m_User: IMetabaseUser;
St: IStations;
Dm: IDomains;
Begin
MB := MetabaseClass.Active;
Sec := MB.Security;
m_User := Sec.ResolveName("ADMIN") As IMetabaseUser;
St := m_User.Stations;
Dm := St.Domains;
Dm.Remove(0);
Sec.Apply;
End Sub Button1OnClick;
Pressing the button will remove the first domain from the collection.
See also: