Partager via


ManagementAgentCollection.Item Property

Gets a specific member of the collection. Items in the collection are returned as strings.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

'Usage
Dim instance As ManagementAgentCollection
Dim MAName As String
Dim value As ManagementAgent

value = instance(MAName)

Syntax

'Declaration
Public MustOverride ReadOnly Default Property Item ( _
    MAName As String _
) As ManagementAgent
public abstract ManagementAgent this [
    string MAName
] { get; }
public:
virtual property ManagementAgent^ default [String^] {
    ManagementAgent^ get (String^ MAName) abstract;
}
/** @property */
public abstract ManagementAgent get_Item (String MAName)

Parameters

  • MAName
    Contains a string that identifies the management agent to retrieve. The management agent name is not case-sensitive. If the management agent is not present in the collection, this property throws the NoSuchManagementAgentException exception.

Property Value

Returns a ManagementAgent object.

Exceptions

Exception type Condition
System.ArgumentNullException

The argument is null.

NoSuchManagementAgentException

The management agent that is identified by the MAName parameter is not present in the collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

ManagementAgentCollection Class
ManagementAgentCollection Members
Microsoft.MetadirectoryServices Namespace
ManagementAgent Class
NoSuchManagementAgentException
ManagementAgentCollection Class