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
TObjectThe type of the object.
TValueThe type of the value.
- Implements
-
IEquatable<ItemWithValue<TObject, TValue>>
- Extension Methods
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
itemTObjectThe item.
valueTValueThe 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
otherItemWithValue<TObject, TValue>
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
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
leftItemWithValue<TObject, TValue>The left.
rightItemWithValue<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
leftItemWithValue<TObject, TValue>The left.
rightItemWithValue<TObject, TValue>The right.
Returns
- bool
The result of the operator.