Class Spans
Utilities for working with System.Span<T> objects.
Inheritance
System.Object
Spans
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SudokuSpice
Assembly: SudokuSpice.dll
Syntax
public static class Spans
Methods
| Improve this Doc View SourcePopRandom<T>(Random, Span<T>)
Pops a random value from the span between 0 (inclusive) and end (exclusive).
Modifies the Span to swap the returned value to the end of the given range.
Declaration
public static T PopRandom<T>(Random rand, Span<T> data)
Parameters
Type | Name | Description |
---|---|---|
System.Random | rand | The random instance to use. |
System.Span<T> | data | The span to pop from. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The type of data in the Span. |