Guard.IsNotInRangeFor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IsNotInRangeFor(Int32, String, String) |
Asserts that the input index is not valid for a given String instance. |
IsNotInRangeFor<T>(Int32, T[], String) |
Asserts that the input index is not valid for a given array instance. |
IsNotInRangeFor<T>(Int32, Span<T>, String) |
Asserts that the input index is not valid for a given Span<T> instance. |
IsNotInRangeFor<T>(Int32, ReadOnlySpan<T>, String) |
Asserts that the input index is not valid for a given ReadOnlySpan<T> instance. |
IsNotInRangeFor<T>(Int32, ReadOnlyMemory<T>, String) |
Asserts that the input index is not valid for a given ReadOnlyMemory<T> instance. |
IsNotInRangeFor<T>(Int32, ICollection<T>, String) |
Asserts that the input index is not valid for a given ICollection<T> instance. |
IsNotInRangeFor<T>(Int32, List<T>, String) |
Asserts that the input index is not valid for a given List<T> instance. |
IsNotInRangeFor<T>(Int32, IReadOnlyCollection<T>, String) |
Asserts that the input index is not valid for a given IReadOnlyCollection<T> instance. |
IsNotInRangeFor<T>(Int32, Memory<T>, String) |
Asserts that the input index is not valid for a given Memory<T> instance. |
IsNotInRangeFor(Int32, String, String)
Asserts that the input index is not valid for a given String instance.
public static void IsNotInRangeFor (int index, string text, string name);
static member IsNotInRangeFor : int * string * string -> unit
Public Shared Sub IsNotInRangeFor (index As Integer, text As String, name As String)
Parameters
- index
- Int32
The input index to be used to access text
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access text
.
Applies to
IsNotInRangeFor<T>(Int32, T[], String)
Asserts that the input index is not valid for a given array instance.
public static void IsNotInRangeFor<T> (int index, T[] array, string name);
static member IsNotInRangeFor : int * 'T[] * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, array As T(), name As String)
Type Parameters
- T
The item of items in the input array instance.
Parameters
- index
- Int32
The input index to be used to access array
.
- array
- T[]
The input array instance to use to validate index
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access array
.
Applies to
IsNotInRangeFor<T>(Int32, Span<T>, String)
Asserts that the input index is not valid for a given Span<T> instance.
public static void IsNotInRangeFor<T> (int index, Span<T> span, string name);
static member IsNotInRangeFor : int * Span<'T> * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, span As Span(Of T), name As String)
Type Parameters
- T
The item of items in the input Span<T> instance.
Parameters
- index
- Int32
The input index to be used to access span
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access span
.
Applies to
IsNotInRangeFor<T>(Int32, ReadOnlySpan<T>, String)
Asserts that the input index is not valid for a given ReadOnlySpan<T> instance.
public static void IsNotInRangeFor<T> (int index, ReadOnlySpan<T> span, string name);
static member IsNotInRangeFor : int * ReadOnlySpan<'T> * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, span As ReadOnlySpan(Of T), name As String)
Type Parameters
- T
The item of items in the input ReadOnlySpan<T> instance.
Parameters
- index
- Int32
The input index to be used to access span
.
- span
- ReadOnlySpan<T>
The input ReadOnlySpan<T> instance to use to validate index
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access span
.
Applies to
IsNotInRangeFor<T>(Int32, ReadOnlyMemory<T>, String)
Asserts that the input index is not valid for a given ReadOnlyMemory<T> instance.
public static void IsNotInRangeFor<T> (int index, ReadOnlyMemory<T> memory, string name);
static member IsNotInRangeFor : int * ReadOnlyMemory<'T> * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, memory As ReadOnlyMemory(Of T), name As String)
Type Parameters
- T
The item of items in the input ReadOnlyMemory<T> instance.
Parameters
- index
- Int32
The input index to be used to access memory
.
- memory
- ReadOnlyMemory<T>
The input ReadOnlyMemory<T> instance to use to validate index
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access memory
.
Applies to
IsNotInRangeFor<T>(Int32, ICollection<T>, String)
Asserts that the input index is not valid for a given ICollection<T> instance.
public static void IsNotInRangeFor<T> (int index, System.Collections.Generic.ICollection<T> collection, string name);
static member IsNotInRangeFor : int * System.Collections.Generic.ICollection<'T> * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, collection As ICollection(Of T), name As String)
Type Parameters
- T
The item of items in the input ICollection<T> instance.
Parameters
- index
- Int32
The input index to be used to access collection
.
- collection
- ICollection<T>
The input ICollection<T> instance to use to validate index
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access collection
.
Applies to
IsNotInRangeFor<T>(Int32, List<T>, String)
Asserts that the input index is not valid for a given List<T> instance.
public static void IsNotInRangeFor<T> (int index, System.Collections.Generic.List<T> list, string name);
static member IsNotInRangeFor : int * System.Collections.Generic.List<'T> * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, list As List(Of T), name As String)
Type Parameters
- T
The item of items in the input List<T> instance.
Parameters
- index
- Int32
The input index to be used to access list
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access list
.
Applies to
IsNotInRangeFor<T>(Int32, IReadOnlyCollection<T>, String)
Asserts that the input index is not valid for a given IReadOnlyCollection<T> instance.
public static void IsNotInRangeFor<T> (int index, System.Collections.Generic.IReadOnlyCollection<T> collection, string name);
static member IsNotInRangeFor : int * System.Collections.Generic.IReadOnlyCollection<'T> * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, collection As IReadOnlyCollection(Of T), name As String)
Type Parameters
- T
The item of items in the input IReadOnlyCollection<T> instance.
Parameters
- index
- Int32
The input index to be used to access collection
.
- collection
- IReadOnlyCollection<T>
The input IReadOnlyCollection<T> instance to use to validate index
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access collection
.
Applies to
IsNotInRangeFor<T>(Int32, Memory<T>, String)
Asserts that the input index is not valid for a given Memory<T> instance.
public static void IsNotInRangeFor<T> (int index, Memory<T> memory, string name);
static member IsNotInRangeFor : int * Memory<'T> * string -> unit
Public Shared Sub IsNotInRangeFor(Of T) (index As Integer, memory As Memory(Of T), name As String)
Type Parameters
- T
The item of items in the input Memory<T> instance.
Parameters
- index
- Int32
The input index to be used to access memory
.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if index
is valid to access memory
.