Class Pair<FirstType, SecondType>
Two objects as one. Use this e.g. to store objects that belong together in a single collection.
Inheritance
System.Object
Pair<FirstType, SecondType>
Implements
System.ICloneable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Sdl.FileTypeSupport.Framework
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public class Pair<FirstType, SecondType> : ICloneable
Type Parameters
Name | Description |
---|---|
FirstType | |
SecondType |
Constructors
Pair(FirstType, SecondType)
Contruct a new pair form the specifiec objects.
Declaration
public Pair(FirstType first, SecondType second)
Parameters
Type | Name | Description |
---|---|---|
FirstType | first | |
SecondType | second |
Properties
First
The first of the two objects in the pair.
Declaration
public FirstType First { get; set; }
Property Value
Type | Description |
---|---|
FirstType |
Second
The second of the two objects in the pair.
Declaration
public SecondType Second { get; set; }
Property Value
Type | Description |
---|---|
SecondType |
Methods
Clone()
Clone the pair. If a type implements ICloneable it is deep cloned, otherwise a shallow clone is used.
Declaration
public virtual object Clone()
Returns
Type | Description |
---|---|
System.Object |
Equals(Object)
true
if First and Second are equal for both objects.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Returns a combiniation of the hash codes of First and Second.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
Implements
System.ICloneable