Table of Contents

Class RefPair<TFirst, TSecond>

Namespace
Ecng.Common
Assembly
Ecng.Common.dll

Represents a pair of reference values.

public class RefPair<TFirst, TSecond> : IRefTuple

Type Parameters

TFirst

Type of the first element.

TSecond

Type of the second element.

Inheritance
RefPair<TFirst, TSecond>
Implements
Derived
Inherited Members
Extension Methods

Constructors

RefPair()

Initializes a new instance of the RefPair<TFirst, TSecond> class.

public RefPair()

RefPair(TFirst, TSecond)

Initializes a new instance of the RefPair<TFirst, TSecond> class with specified values.

public RefPair(TFirst first, TSecond second)

Parameters

first TFirst

The first element.

second TSecond

The second element.

Properties

First

Gets or sets the first element.

public TFirst First { get; set; }

Property Value

TFirst

Second

Gets or sets the second element.

public TSecond Second { get; set; }

Property Value

TSecond

Values

Gets or sets the tuple values.

public virtual IEnumerable<object> Values { get; set; }

Property Value

IEnumerable<object>

Methods

GetValuesString()

Gets a string that represents the tuple values.

protected virtual string GetValuesString()

Returns

string

A string representation of the tuple values.

ToString()

Returns a string that represents the tuple.

public override string ToString()

Returns

string

A string representation of the tuple.

ToValuePair()

Converts the tuple to a KeyValuePair.

public KeyValuePair<TFirst, TSecond> ToValuePair()

Returns

KeyValuePair<TFirst, TSecond>

A KeyValuePair containing the first and second elements.