String​Values String​Values Struct

Definition

Represents zero/null, one, or many strings in an efficient way.
public struct StringValues : IList<string>, IReadOnlyList<string>, IEquatable<StringValues>, IEquatable<string>, IEquatable<string[]>Public Structure StringValues
    Implements IList(Of String), IReadOnlyList(Of String), IEquatable(Of StringValues), IEquatable(Of String), IEquatable(Of String())
Implements
IList<System.String>IList(Of System.String) IReadOnlyList<System.String>IReadOnlyList(Of System.String) IEquatable<StringValues>IEquatable(Of StringValues) IEquatable<System.String>IEquatable(Of System.String) IEquatable<System.String[]>IEquatable(Of System.String())

Constructors

StringValues(String) StringValues(String)

public StringValues(string value)Public Sub New(value As String)
Parameters
value
System.String System.String

StringValues(String[]) StringValues(String())

public StringValues(string[] values)Public Sub New(values As String())
Parameters
values
System.String[] System.String()

Fields

Empty Empty

public static readonly StringValues EmptyPublic Shared ReadOnly Empty As StringValues

Properties

Count Count

public int Count { get; }Public ReadOnly Property Count As Integer
Value
System.Int32 System.Int32

Item[Int32] Item(Int32)

public string this[int index] { get; }Public ReadOnly Property Item(index As Integer) As String
Parameters
index
System.Int32 System.Int32
Value
System.String System.String

Methods

Concat(StringValues, StringValues) Concat(StringValues, StringValues)

public static StringValues Concat(StringValues values1, StringValues values2)Public Shared Function Concat(values1 As StringValues, values2 As StringValues) As StringValues
Parameters
Returns

Equals(StringValues) Equals(StringValues)

public bool Equals(StringValues other)Public Function Equals(other As StringValues) As Boolean
Parameters
Returns
System.Boolean System.Boolean

Equals(StringValues, StringValues) Equals(StringValues, StringValues)

public static bool Equals(StringValues left, StringValues right)Public Shared Function Equals(left As StringValues, right As StringValues) As Boolean
Parameters
Returns
System.Boolean System.Boolean

Equals(StringValues, String) Equals(StringValues, String)

public static bool Equals(StringValues left, string right)Public Shared Function Equals(left As StringValues, right As String) As Boolean
Parameters
right
System.String System.String
Returns
System.Boolean System.Boolean

Equals(StringValues, String[]) Equals(StringValues, String())

public static bool Equals(StringValues left, string[] right)Public Shared Function Equals(left As StringValues, right As String()) As Boolean
Parameters
right
System.String[] System.String()
Returns
System.Boolean System.Boolean

Equals(Object) Equals(Object)

public override bool Equals(object obj)Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
System.Object System.Object
Returns
System.Boolean System.Boolean

Equals(String) Equals(String)

public bool Equals(string other)Public Function Equals(other As String) As Boolean
Parameters
other
System.String System.String
Returns
System.Boolean System.Boolean

Equals(String, StringValues) Equals(String, StringValues)

public static bool Equals(string left, StringValues right)Public Shared Function Equals(left As String, right As StringValues) As Boolean
Parameters
left
System.String System.String
Returns
System.Boolean System.Boolean

Equals(String[]) Equals(String())

public bool Equals(string[] other)Public Function Equals(other As String()) As Boolean
Parameters
other
System.String[] System.String()
Returns
System.Boolean System.Boolean

Equals(String[], StringValues) Equals(String(), StringValues)

public static bool Equals(string[] left, StringValues right)Public Shared Function Equals(left As String(), right As StringValues) As Boolean
Parameters
left
System.String[] System.String()
Returns
System.Boolean System.Boolean

GetEnumerator() GetEnumerator()

public StringValues.Enumerator GetEnumerator()Public Function GetEnumerator As StringValues.Enumerator
Returns

GetHashCode() GetHashCode()

public override int GetHashCode()Public Overrides Function GetHashCode As Integer
Returns
System.Int32 System.Int32

IsNullOrEmpty(StringValues) IsNullOrEmpty(StringValues)

public static bool IsNullOrEmpty(StringValues value)Public Shared Function IsNullOrEmpty(value As StringValues) As Boolean
Parameters
Returns
System.Boolean System.Boolean

ToArray() ToArray()

public string[] ToArray()Public Function ToArray As String()
Returns
System.String[] System.String()

ToString() ToString()

public override string ToString()Public Overrides Function ToString As String
Returns
System.String System.String

Operators

Equality(StringValues, StringValues) Equality(StringValues, StringValues)

public static bool operator ==(StringValues left, StringValues right)Public Shared Operator =(left As StringValues, right As StringValues) As Boolean
Parameters
Returns
System.Boolean System.Boolean

Equality(StringValues, Object) Equality(StringValues, Object)

public static bool operator ==(StringValues left, object right)Public Shared Operator =(left As StringValues, right As Object) As Boolean
Parameters
right
System.Object System.Object
Returns
System.Boolean System.Boolean

Equality(StringValues, String) Equality(StringValues, String)

public static bool operator ==(StringValues left, string right)Public Shared Operator =(left As StringValues, right As String) As Boolean
Parameters
right
System.String System.String
Returns
System.Boolean System.Boolean

Equality(StringValues, String[]) Equality(StringValues, String())

public static bool operator ==(StringValues left, string[] right)Public Shared Operator =(left As StringValues, right As String()) As Boolean
Parameters
right
System.String[] System.String()
Returns
System.Boolean System.Boolean

Equality(Object, StringValues) Equality(Object, StringValues)

public static bool operator ==(object left, StringValues right)Public Shared Operator =(left As Object, right As StringValues) As Boolean
Parameters
left
System.Object System.Object
Returns
System.Boolean System.Boolean

Equality(String, StringValues) Equality(String, StringValues)

public static bool operator ==(string left, StringValues right)Public Shared Operator =(left As String, right As StringValues) As Boolean
Parameters
left
System.String System.String
Returns
System.Boolean System.Boolean

Equality(String[], StringValues) Equality(String(), StringValues)

public static bool operator ==(string[] left, StringValues right)Public Shared Operator =(left As String(), right As StringValues) As Boolean
Parameters
left
System.String[] System.String()
Returns
System.Boolean System.Boolean

Implicit(StringValues to String) Widening(StringValues to String)

public static implicit operator string (StringValues values)Public Shared Widening Operator CType(values As StringValues) As String
Parameters
Returns
System.String System.String

Implicit(StringValues to String[]) Widening(StringValues to String())

public static implicit operator string[](StringValues value)Public Shared Widening Operator CType(value As StringValues) As String()
Parameters
Returns
System.String[] System.String()

Implicit(String to StringValues) Widening(String to StringValues)

public static implicit operator StringValues(string value)Public Shared Widening Operator CType(value As String) As StringValues
Parameters
value
System.String System.String
Returns

Implicit(String[] to StringValues) Widening(String() to StringValues)

public static implicit operator StringValues(string[] values)Public Shared Widening Operator CType(values As String()) As StringValues
Parameters
values
System.String[] System.String()
Returns

Inequality(StringValues, StringValues) Inequality(StringValues, StringValues)

public static bool operator !=(StringValues left, StringValues right)Public Shared Operator <>(left As StringValues, right As StringValues) As Boolean
Parameters
Returns
System.Boolean System.Boolean

Inequality(StringValues, Object) Inequality(StringValues, Object)

public static bool operator !=(StringValues left, object right)Public Shared Operator <>(left As StringValues, right As Object) As Boolean
Parameters
right
System.Object System.Object
Returns
System.Boolean System.Boolean

Inequality(StringValues, String) Inequality(StringValues, String)

public static bool operator !=(StringValues left, string right)Public Shared Operator <>(left As StringValues, right As String) As Boolean
Parameters
right
System.String System.String
Returns
System.Boolean System.Boolean

Inequality(StringValues, String[]) Inequality(StringValues, String())

public static bool operator !=(StringValues left, string[] right)Public Shared Operator <>(left As StringValues, right As String()) As Boolean
Parameters
right
System.String[] System.String()
Returns
System.Boolean System.Boolean

Inequality(Object, StringValues) Inequality(Object, StringValues)

public static bool operator !=(object left, StringValues right)Public Shared Operator <>(left As Object, right As StringValues) As Boolean
Parameters
left
System.Object System.Object
Returns
System.Boolean System.Boolean

Inequality(String, StringValues) Inequality(String, StringValues)

public static bool operator !=(string left, StringValues right)Public Shared Operator <>(left As String, right As StringValues) As Boolean
Parameters
left
System.String System.String
Returns
System.Boolean System.Boolean

Inequality(String[], StringValues) Inequality(String(), StringValues)

public static bool operator !=(string[] left, StringValues right)Public Shared Operator <>(left As String(), right As StringValues) As Boolean
Parameters
left
System.String[] System.String()
Returns
System.Boolean System.Boolean