Struct ItemWithValue<TObject, TValue>
- Namespace
- DynamicData.Kernel
- Assembly
- DynamicData.dll
Container for an item and it's Value from a list.
public readonly struct ItemWithValue<TObject, TValue> : IEquatable<ItemWithValue<TObject, TValue>>
Type Parameters
TObject
The type of the object.
TValue
The type of the value.
- Implements
-
IEquatable<ItemWithValue<TObject, TValue>>
Remarks
Initializes a new instance of the ItemWithValue<TObject, TValue> struct. Initializes a new instance of the ItemWithIndex<T> class.
Constructors
ItemWithValue(TObject, TValue)
Container for an item and it's Value from a list.
public ItemWithValue(TObject item, TValue value)
Parameters
item
TObjectThe item.
value
TValueThe Value.
Remarks
Initializes a new instance of the ItemWithValue<TObject, TValue> struct. Initializes a new instance of the ItemWithIndex<T> class.
Properties
Item
Gets the item.
public TObject Item { get; }
Property Value
- TObject
Value
Gets the Value.
public TValue Value { get; }
Property Value
- TValue
Methods
Equals(ItemWithValue<TObject, TValue>)
public bool Equals(ItemWithValue<TObject, TValue> other)
Parameters
other
ItemWithValue<TObject, TValue>
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(in ItemWithValue<TObject, TValue>, in ItemWithValue<TObject, TValue>)
Implements the operator ==.
public static bool operator ==(in ItemWithValue<TObject, TValue> left, in ItemWithValue<TObject, TValue> right)
Parameters
left
ItemWithValue<TObject, TValue>The left.
right
ItemWithValue<TObject, TValue>The right.
Returns
- bool
The result of the operator.
operator !=(in ItemWithValue<TObject, TValue>, in ItemWithValue<TObject, TValue>)
Implements the operator !=.
public static bool operator !=(in ItemWithValue<TObject, TValue> left, in ItemWithValue<TObject, TValue> right)
Parameters
left
ItemWithValue<TObject, TValue>The left.
right
ItemWithValue<TObject, TValue>The right.
Returns
- bool
The result of the operator.