Export (0) Print
Expand All

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.

System.Object
  System.Management.ManagementObjectCollection

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

public class ManagementObjectCollection : ICollection, 
	IEnumerable, IDisposable

The ManagementObjectCollection type exposes the following members.

  NameDescription
Public propertyCountGets a value indicating the number of objects in the collection.
Public propertyIsSynchronizedGets a value indicating whether the object is synchronized.
Public propertySyncRootGets the object to be used for synchronization.
Top

  NameDescription
Public methodCopyTo(Array, Int32)Copies the collection to an array.
Public methodCopyTo(ManagementBaseObject[], Int32)Copies the items in the collection to a ManagementBaseObject array.
Public methodDisposeReleases resources associated with this object. After this method has been called, an attempt to use this object will result in an ObjectDisposedException being thrown.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeDisposes of resources the object is holding. This is the destructor for the object. Finalizers are expressed using destructor syntax. (Overrides Object.Finalize().)
Public methodGetEnumeratorReturns the enumerator for the collection.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast<TResult>Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an IEnumerator that iterates through the ManagementObjectCollection.
Top

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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

Community Additions

ADD
Show:
© 2014 Microsoft