StringValues.Equals Method

Definition

Overloads

Equals(String[], StringValues)

Determines whether the specified string array and StringValues objects have the same values.

Equals(String, StringValues)

Determines whether the specified String and StringValues objects have the same values.

Equals(StringValues, String[])

Determines whether the specified StringValues and string array objects have the same values.

Equals(StringValues, String)

Determines whether the specified StringValues and String objects have the same values.

Equals(StringValues, StringValues)

Determines whether two specified StringValues objects have the same values in the same order.

Equals(String[])

Determines whether this instance and a specified string array have the same values.

Equals(String)

Determines whether this instance and a specified String, have the same value.

Equals(Object)

Determines whether this instance and a specified object have the same value.

Equals(StringValues)

Determines whether this instance and another specified StringValues object have the same values.

Equals(String[], StringValues)

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether the specified string array and StringValues objects have the same values.

C#
public static bool Equals(string?[]? left, Microsoft.Extensions.Primitives.StringValues right);

Parameters

left
String[]

The string array to compare.

right
StringValues

The StringValues to compare.

Returns

true if the value of left is the same as the value of right; otherwise, false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(String, StringValues)

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether the specified String and StringValues objects have the same values.

C#
public static bool Equals(string? left, Microsoft.Extensions.Primitives.StringValues right);

Parameters

left
String

The String to compare.

right
StringValues

The StringValues to compare.

Returns

true if the value of left is the same as the value of right; otherwise, false. If left is null, the method returns false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(StringValues, String[])

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether the specified StringValues and string array objects have the same values.

C#
public static bool Equals(Microsoft.Extensions.Primitives.StringValues left, string?[]? right);

Parameters

left
StringValues

The StringValues to compare.

right
String[]

The string array to compare.

Returns

true if the value of left is the same as the value of right; otherwise, false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(StringValues, String)

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether the specified StringValues and String objects have the same values.

C#
public static bool Equals(Microsoft.Extensions.Primitives.StringValues left, string? right);

Parameters

left
StringValues

The StringValues to compare.

right
String

The String to compare.

Returns

true if the value of left is the same as the value of right; otherwise, false. If right is null, the method returns false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(StringValues, StringValues)

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether two specified StringValues objects have the same values in the same order.

C#
public static bool Equals(Microsoft.Extensions.Primitives.StringValues left, Microsoft.Extensions.Primitives.StringValues right);

Parameters

left
StringValues

The first StringValues to compare.

right
StringValues

The second StringValues to compare.

Returns

true if the value of left is the same as the value of right; otherwise, false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(String[])

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether this instance and a specified string array have the same values.

C#
public bool Equals(string?[]? other);

Parameters

other
String[]

The string array to compare to this instance.

Returns

true if the value of other is the same as this instance; otherwise, false.

Implements

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(String)

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether this instance and a specified String, have the same value.

C#
public bool Equals(string? other);

Parameters

other
String

The String to compare to this instance.

Returns

true if the value of other is the same as this instance; otherwise, false. If other is null, returns false.

Implements

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(Object)

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether this instance and a specified object have the same value.

C#
public override bool Equals(object? obj);

Parameters

obj
Object

An object to compare with this object.

Returns

true if the current object is equal to obj; otherwise, false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Equals(StringValues)

Source:
StringValues.cs
Source:
StringValues.cs
Source:
StringValues.cs

Determines whether this instance and another specified StringValues object have the same values.

C#
public bool Equals(Microsoft.Extensions.Primitives.StringValues other);

Parameters

other
StringValues

The string to compare to this instance.

Returns

true if the value of other is the same as the value of this instance; otherwise, false.

Implements

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)