ManagementObjectCollection Class
TOC
Collapse the table of content
Expand the table of content

ManagementObjectCollection Class

 

Represents different collections of management objects retrieved through WMI. The objects in this collection are of ManagementBaseObject-derived types, including ManagementObject and ManagementClass. The collection can be the result of a WMI query executed through a ManagementObjectSearcher, or an enumeration of management objects of a specified type retrieved through a ManagementClass representing that type. In addition, this can be a collection of management objects related in a specified way to a specific management object - in this case the collection would be retrieved through a method such as GetRelated(). The collection can be walked using the ManagementObjectCollection.ManagementObjectEnumerator and objects in it can be inspected or manipulated for various management tasks.

Namespace:   System.Management
Assembly:  System.Management (in System.Management.dll)

System.Object
  System.Management.ManagementObjectCollection

public class ManagementObjectCollection : ICollection, IEnumerable, 
	IDisposable

NameDescription
System_CAPS_pubpropertyCount

Gets a value indicating the number of objects in the collection.

System_CAPS_pubpropertyIsSynchronized

Gets a value indicating whether the object is synchronized.

System_CAPS_pubpropertySyncRoot

Gets the object to be used for synchronization.

NameDescription
System_CAPS_pubmethodCopyTo(Array, Int32)

Copies the collection to an array.

System_CAPS_pubmethodCopyTo(ManagementBaseObject[], Int32)

Copies the items in the collection to a ManagementBaseObject array.

System_CAPS_pubmethodDispose()

Releases resources associated with this object. After this method has been called, an attempt to use this object will result in an ObjectDisposedException being thrown.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Disposes of resources the object is holding. This is the destructor for the object. Finalizers are expressed using destructor syntax. (Overrides Object.Finalize().)

System_CAPS_pubmethodGetEnumerator()

Returns the enumerator for the collection.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an IEnumerator that iterates through the ManagementObjectCollection.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

.NET Framework
Available since 1.1

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

Return to top
Show:
© 2016 Microsoft