Skip to content

Children<TNode>.UnsafeSlice Method ​

Overloads ​

NameDescription
UnsafeSlice(Int32, Int32)Returns a ReadOnlySpan<T> of a range of nodes in the source Children<TNode>. Nodes should not be added or removed from the Children<TNode> while the ReadOnlySpan<T> is in use.
UnsafeSlice(Range)Returns a ReadOnlySpan<T> of a range of nodes in the source Children<TNode>. Nodes should not be added or removed from the Children<TNode> while the ReadOnlySpan<T> is in use.

UnsafeSlice(Int32, Int32) ​

Returns a ReadOnlySpan<T> of a range of nodes in the source Children<TNode>. Nodes should not be added or removed from the Children<TNode> while the ReadOnlySpan<T> is in use.

c#
public ReadOnlySpan<TNode> UnsafeSlice(int index, int count);

View source

Parameters ​

NameTypeDescription
indexInt32The zero-based index at which the range starts.
countInt32The number of nodes in the range.

Returns ​

ReadOnlySpan<TNode>

A ReadOnlySpan<T> of a range of nodes in the source Children<TNode>.

UnsafeSlice(Range) ​

Returns a ReadOnlySpan<T> of a range of nodes in the source Children<TNode>. Nodes should not be added or removed from the Children<TNode> while the ReadOnlySpan<T> is in use.

c#
public ReadOnlySpan<TNode> UnsafeSlice(Range range);

View source

Parameters ​

NameTypeDescription
rangeRangeThe Range.

Returns ​

ReadOnlySpan<TNode>

A ReadOnlySpan<T> of a range of nodes in the source Children<TNode>.