ManagementObjectCollection Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public ref class ManagementObjectCollection : IDisposable, System::Collections::ICollection
public class ManagementObjectCollection : IDisposable, System.Collections.ICollection
type ManagementObjectCollection = class
interface ICollection
interface IEnumerable
interface IDisposable
Public Class ManagementObjectCollection
Implements ICollection, IDisposable
- Inheritance
-
ManagementObjectCollection
- Implements
Count |
Gets a value indicating the number of objects in the collection. |
Is |
Gets a value that indicates whether the object is synchronized (thread-safe). |
Sync |
Gets the object to be used for synchronization. |
Copy |
Copies the collection to an array. |
Copy |
Copies the items in the collection to a ManagementBaseObject array. |
Dispose() |
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. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize() |
Disposes of resources the object is holding. This is the destructor for the object. Finalizers are expressed using destructor syntax. |
Get |
Returns the enumerator for the collection. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
IEnumerable. |
Returns an IEnumerator that iterates through the ManagementObjectCollection. |
Cast<TResult>(IEnumerable) |
Casts the elements of an IEnumerable to the specified type. |
Of |
Filters the elements of an IEnumerable based on a specified type. |
As |
Enables parallelization of a query. |
As |
Converts an IEnumerable to an IQueryable. |
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: