Show / Hide Table of Contents

Class Set

Represents various extension methods for sets.

Inheritance
object
Set
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Collections.Generic
Assembly: DotNext.dll
Syntax
public static class Set

Methods

View Source

Range<T, TLowerBound, TUpperBound>(TLowerBound, TUpperBound)

Creates a range using the specified bounds.

Declaration
public static IReadOnlySet<T> Range<T, TLowerBound, TUpperBound>(TLowerBound lowerBound, TUpperBound upperBound) where T : notnull, IBinaryInteger<T> where TLowerBound : notnull, IFiniteRangeEndpoint<T>, allows ref struct where TUpperBound : notnull, IFiniteRangeEndpoint<T>, allows ref struct
Parameters
Type Name Description
TLowerBound lowerBound

The lower bound of the range.

TUpperBound upperBound

The upper bound of the range.

Returns
Type Description
IReadOnlySet<T>

An ordered set of elements in the range.

Type Parameters
Name Description
T
TLowerBound

The type of lower bound.

TUpperBound

The type of upper bound.

View Source

Singleton<T>(T)

Constructs read-only set with a single item in it.

Declaration
public static IReadOnlySet<T> Singleton<T>(T item)
Parameters
Type Name Description
T item

An item to be placed into set.

Returns
Type Description
IReadOnlySet<T>

Read-only set containing single item.

Type Parameters
Name Description
T
View Source

get_Empty<T>()

Gets the empty set.

Declaration
public static IReadOnlySet<T> get_Empty<T>()
Returns
Type Description
IReadOnlySet<T>
Type Parameters
Name Description
T
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾