Udostępnij za pośrednictwem


ISet<T>.IsSubsetOf Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Determines whether a set is a subset of a specified collection.

Namespace:  System.Collections.Generic
Assembly:  System (in System.dll)

Syntax

'Declaration
Function IsSubsetOf ( _
    other As IEnumerable(Of T) _
) As Boolean
bool IsSubsetOf(
    IEnumerable<T> other
)

Parameters

Return Value

Type: System.Boolean
true if the current set is a subset of other; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

other is nulla null reference (Nothing in Visual Basic).

Remarks

If other contains the same elements as the current set, the current set is still considered a subset of other.

This method always returns false if the current set has elements that are not in other.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.