Show / Hide Table of Contents

Class Set

Represents various extension methods for sets.

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

Methods

| Edit this page 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 : IBinaryInteger<T> where TLowerBound : IFiniteRangeEndpoint<T> where TUpperBound : IFiniteRangeEndpoint<T>
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

The type of the elements in the range.

TLowerBound

The type of lower bound.

TUpperBound

The type of upper bound.

| Edit this page 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

Type of set items.

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾