Language

MemoryExtensions.ContainsAnyExcept Method

Definition

Searches the specified span for any value other than value.

Overloads

Name Description
ContainsAnyExcept(Span, T, T)

Searches the specified span for any value other than value0 or value1.

ContainsAnyExcept(ReadOnlySpan, T, T, IEqualityComparer)

Searches for any value other than value0 or value1.

ContainsAnyExcept(ReadOnlySpan, T, T)

Searches the specified span for any value other than value0 or value1.

ContainsAnyExcept(ReadOnlySpan, T, T, T, IEqualityComparer)

Searches for any value other than value0, value1, or value2.

ContainsAnyExcept(ReadOnlySpan, T, T, T)

Searches for any value other than value0, value1, or value2.

ContainsAnyExcept(ReadOnlySpan, T, IEqualityComparer)

Searches the specified span for any value other than value.

ContainsAnyExcept(Span, T, T, T)

Searches for any value other than value0, value1, or value2.

ContainsAnyExcept(Span, T)

Searches the specified span for any value other than the specified value.

ContainsAnyExcept(Span, ReadOnlySpan)

Searches the specified span for any value other than the specified values.

ContainsAnyExcept(Span, SearchValues)

Searches the specified span for any value other than the specified values.

ContainsAnyExcept(ReadOnlySpan, T)

Searches the specified span for any value other than the specified value.

ContainsAnyExcept(ReadOnlySpan, ReadOnlySpan)

Searches the specified span for any value other than the specified values.

ContainsAnyExcept(ReadOnlySpan, SearchValues)

Searches the specified span for any value other than the specified values.

ContainsAnyExcept(ReadOnlySpan, ReadOnlySpan, IEqualityComparer)

Searches the specified span for any value other than the specified values.

ContainsAnyExcept(Span, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than value0 or value1.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(Span span, T value0, T value1);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAnyExcept(this Span span, T value0, T value1) where T : IEquatable;
public static bool ContainsAnyExcept(this Span span, T value0, T value1) where T : IEquatable;
[]
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), value0 As T, value1 As T) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
Span

The span to search.

value0
T

The first value to exclude from the search.

value1
T

The second value to exclude from the search.

Returns

true if any value other than value0 or value1 is present in the span. If all of the span's values are value0 or value1, returns false.

Attributes

Applies to

ContainsAnyExcept(ReadOnlySpan, T, T, IEqualityComparer)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for any value other than value0 or value1.

public static bool ContainsAnyExcept(this ReadOnlySpan span, T value0, T value1, System.Collections.Generic.IEqualityComparer? comparer = default);
static member ContainsAnyExcept : ReadOnlySpan<'T> * 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> bool

Public Function ContainsAnyExcept(Of T) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Boolean

Type Parameters

T

Parameters

span
ReadOnlySpan

The span to search.

value0
T

The first value to avoid.

value1
T

The second value to avoid.

comparer
IEqualityComparer

The IEqualityComparer implementation to use when comparing elements, or null to use the default IEqualityComparer for the type of an element.

Returns

true if any value other than value0 and value1 is present in the span. If all of the span's values are value0 or value1, returns false.

Applies to

ContainsAnyExcept(ReadOnlySpan, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than value0 or value1.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(ReadOnlySpan span, T value0, T value1);
public static bool ContainsAnyExcept(this ReadOnlySpan span, T value0, T value1) where T : IEquatable;
static member ContainsAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value0 As T, value1 As T) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
ReadOnlySpan

The span to search.

value0
T

The first value to exclude from the search.

value1
T

The second value to exclude from the search.

Returns

true if any value other than value0 or value1 is present in the span. If all of the span's values are value0 or value1, returns false.

Applies to

ContainsAnyExcept(ReadOnlySpan, T, T, T, IEqualityComparer)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for any value other than value0, value1, or value2.

public static bool ContainsAnyExcept(this ReadOnlySpan span, T value0, T value1, T value2, System.Collections.Generic.IEqualityComparer? comparer = default);
static member ContainsAnyExcept : ReadOnlySpan<'T> * 'T * 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> bool

Public Function ContainsAnyExcept(Of T) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, value2 As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Boolean

Type Parameters

T

Parameters

span
ReadOnlySpan

The span to search.

value0
T

The first value to avoid.

value1
T

The second value to avoid.

value2
T

The third value to avoid.

comparer
IEqualityComparer

The IEqualityComparer implementation to use when comparing elements, or null to use the default IEqualityComparer for the type of an element.

Returns

true if any value other than value0, value1, and value2 is present in the span. If all of the span's values are value0, value1, or value2, returns false.

Applies to

ContainsAnyExcept(ReadOnlySpan, T, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for any value other than value0, value1, or value2.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(ReadOnlySpan span, T value0, T value1, T value2);
public static bool ContainsAnyExcept(this ReadOnlySpan span, T value0, T value1, T value2) where T : IEquatable;
static member ContainsAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value0 As T, value1 As T, value2 As T) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
ReadOnlySpan

The span to search.

value0
T

The first value to exclude from the search.

value1
T

The second value to exclude from the search.

value2
T

The third value to exclude from the search.

Returns

true if any value other than value0, value1, or value2 is present in the span. If all of the span's values are value0, value1, or value2, returns false.

Applies to

ContainsAnyExcept(ReadOnlySpan, T, IEqualityComparer)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than value.

public static bool ContainsAnyExcept(this ReadOnlySpan span, T value, System.Collections.Generic.IEqualityComparer? comparer = default);
static member ContainsAnyExcept : ReadOnlySpan<'T> * 'T * System.Collections.Generic.IEqualityComparer<'T> -> bool

Public Function ContainsAnyExcept(Of T) (span As ReadOnlySpan(Of T), value As T, Optional comparer As IEqualityComparer(Of T) = Nothing) As Boolean

Type Parameters

T

Parameters

span
ReadOnlySpan

The span to search.

value
T

The value to avoid.

comparer
IEqualityComparer

The IEqualityComparer implementation to use when comparing elements, or null to use the default IEqualityComparer for the type of an element.

Returns

true if any value other than value is present in the span. If all of the span's values are value, returns false.

Applies to

ContainsAnyExcept(Span, T, T, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches for any value other than value0, value1, or value2.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(Span span, T value0, T value1, T value2);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAnyExcept(this Span span, T value0, T value1, T value2) where T : IEquatable;
public static bool ContainsAnyExcept(this Span span, T value0, T value1, T value2) where T : IEquatable;
[]
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T * 'T * 'T -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), value0 As T, value1 As T, value2 As T) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
Span

The span to search.

value0
T

The first value to exclude from the search.

value1
T

The second value to exclude from the search.

value2
T

The third value to exclude from the search.

Returns

true if any value other than value0, value1, or value2 is present in the span. If all of the span's values are value0, value1, or value2, returns false.

Attributes

Applies to

ContainsAnyExcept(Span, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than the specified value.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(Span span, T value);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAnyExcept(this Span span, T value) where T : IEquatable;
public static bool ContainsAnyExcept(this Span span, T value) where T : IEquatable;
[]
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), value As T) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
Span

The span to search.

value
T

The value to exclude from the search.

Returns

true if any value other than value is present in the span. If all of the span's values are value, returns false.

Attributes

Applies to

ContainsAnyExcept(Span, ReadOnlySpan)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than the specified values.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(Span span, ReadOnlySpan values);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAnyExcept(this Span span, ReadOnlySpan values) where T : IEquatable;
public static bool ContainsAnyExcept(this Span span, ReadOnlySpan values) where T : IEquatable;
[]
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), values As ReadOnlySpan(Of T)) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
Span

The span to search.

values
ReadOnlySpan

The set of values to exclude from the search.

Returns

true if any value other than those in values is present in the span. If all of the span's values are in values, returns false.

Attributes

Applies to

ContainsAnyExcept(Span, SearchValues)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than the specified values.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(Span span, System::Buffers::SearchValues ^ values);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool ContainsAnyExcept(this Span span, System.Buffers.SearchValues values) where T : IEquatable;
public static bool ContainsAnyExcept(this Span span, System.Buffers.SearchValues values) where T : IEquatable;
[]
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
static member ContainsAnyExcept : Span<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As Span(Of T), values As SearchValues(Of T)) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
Span

The span to search.

values
SearchValues

The set of values to exclude from the search.

Returns

true if any value other than those in values is present in the span. If all of the span's values are in values, returns false.

Attributes

Applies to

ContainsAnyExcept(ReadOnlySpan, T)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than the specified value.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(ReadOnlySpan span, T value);
public static bool ContainsAnyExcept(this ReadOnlySpan span, T value) where T : IEquatable;
static member ContainsAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value As T) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
ReadOnlySpan

The span to search.

value
T

The value to exclude from the search.

Returns

true if any value other than value is present in the span. If all of the span's values are value, returns false.

Applies to

ContainsAnyExcept(ReadOnlySpan, ReadOnlySpan)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than the specified values.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(ReadOnlySpan span, ReadOnlySpan values);
public static bool ContainsAnyExcept(this ReadOnlySpan span, ReadOnlySpan values) where T : IEquatable;
static member ContainsAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), values As ReadOnlySpan(Of T)) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
ReadOnlySpan

The span to search.

values
ReadOnlySpan

The set of values to exclude from the search.

Returns

true if any value other than those in values is present in the span. If all of the span's values are in values, returns false.

Applies to

ContainsAnyExcept(ReadOnlySpan, SearchValues)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than the specified values.

public:
generic 
 where T : IEquatable[System::Runtime::CompilerServices::Extension]
 static bool ContainsAnyExcept(ReadOnlySpan span, System::Buffers::SearchValues ^ values);
public static bool ContainsAnyExcept(this ReadOnlySpan span, System.Buffers.SearchValues values) where T : IEquatable;
static member ContainsAnyExcept : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * System.Buffers.SearchValues<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)

Public Function ContainsAnyExcept(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), values As SearchValues(Of T)) As Boolean

Type Parameters

T

The type of the elements in the span.

Parameters

span
ReadOnlySpan

The span to search.

values
SearchValues

The set of values to exclude from the search.

Returns

true if any value other than those in values is present in the span. If all of the span's values are in values, returns false.

Applies to

ContainsAnyExcept(ReadOnlySpan, ReadOnlySpan, IEqualityComparer)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Searches the specified span for any value other than the specified values.

public static bool ContainsAnyExcept(this ReadOnlySpan span, ReadOnlySpan values, System.Collections.Generic.IEqualityComparer? comparer = default);
static member ContainsAnyExcept : ReadOnlySpan<'T> * ReadOnlySpan<'T> * System.Collections.Generic.IEqualityComparer<'T> -> bool

Public Function ContainsAnyExcept(Of T) (span As ReadOnlySpan(Of T), values As ReadOnlySpan(Of T), Optional comparer As IEqualityComparer(Of T) = Nothing) As Boolean

Type Parameters

T

Parameters

span
ReadOnlySpan

The span to search.

values
ReadOnlySpan

The values to avoid.

comparer
IEqualityComparer

The IEqualityComparer implementation to use when comparing elements, or null to use the default IEqualityComparer for the type of an element.

Returns

true if any value other than those in values is present in the span. If all of the span's values are in values, returns false.

Applies to