Share via


DeviceInformationCollection class (Handheld 8)

2/18/2014

[Microsoft.Embedded.Devices.Enumeration may be altered or unavailable for releases after Windows Embedded 8 Handheld. Use Windows.Devices.Enumeration instead.]

This class represents a collection of DeviceInformation objects.

Syntax

public sealed class DeviceInformationCollection : IReadOnlyList<DeviceInformation>,
    IEnumerable<DeviceInformation>
Public NotInheritableClass DeviceInformationCollection
    Implements IReadOnlyList(Of DeviceInformation), 
    IEnumerable(Of DeviceInformation)
public ref class DeviceInformationCollection sealed : IVectorView<DeviceInformation>,
    IIterable<DeviceInformation>

Members

The following tables list the properties that belong to this class.

Properties

Property Access type Description

Count

Read-only

This property gets the number of elements contained in the collection.

Item

Read-only

This property gets the element at the specified index.

Remarks

Successful completion of FindAll results in a DeviceInformationCollection containing DeviceInformation objects.

DeviceInformationCollection is enumerable, so you can use language-specific syntax, such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<DeviceInformation> explicitly. If you do need to cast explicitly (for example, if you want to call GetEnumerator), cast to IEnumerable<T> with a DeviceInformation constraint.

See Also

Concepts

Microsoft.Embedded.Devices.Enumeration namespace