-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPair.cs
45 lines (39 loc) · 901 Bytes
/
Pair.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.Text;
namespace Innovoft.Collections
{
[System.Diagnostics.DebuggerDisplay("Key = {Key} Value = {Value}")]
public class Pair<TKey, TValue>
{
#region Fields
protected readonly TKey key;
protected TValue value;
#endregion //Fields
#region Constructors
public Pair(TKey key)
{
this.key = key;
}
public Pair(TKey key, TValue value)
{
this.key = key;
this.value = value;
}
public Pair(KeyValuePair<TKey, TValue> copy)
{
this.key = copy.Key;
this.value = copy.Value;
}
public Pair(Pair<TKey, TValue> copy)
{
this.key = copy.key;
this.value = copy.value;
}
#endregion //Constructors
#region Properties
public TKey Key => key;
public TValue Value { get => this.value; set => this.value = value; }
#endregion //Properties
}
}