Partager via


ISet<T>.IsProperSubsetOf Method

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

Determines whether the current set is a property (strict) subset of a specified collection.

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

Syntax

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

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentNullException

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

Remarks

If the current set is a proper subset of other, other must have at least one element that the current set does not have.

An empty set is a correct subset of any other collection. Therefore, this method returns true if the current set is empty, unless the other parameter is also an empty set.

This method always returns false if the current set has more or the same number of elements than 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.