﻿<?xml version="1.0" encoding="utf-8"?><Type Name="Tuple&lt;T1,T2&gt;" FullName="System.Tuple&lt;T1,T2&gt;"><TypeSignature Language="C#" Value="public class Tuple&lt;T1,T2&gt; : IComparable, ITuple, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit Tuple`2&lt;T1, T2&gt; extends System.Object implements class System.Collections.IStructuralComparable, class System.Collections.IStructuralEquatable, class System.IComparable, class System.ITuple" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><TypeParameters><TypeParameter Name="T1" /><TypeParameter Name="T2" /></TypeParameters><Base><BaseTypeName>System.Object</BaseTypeName></Base><Interfaces><Interface><InterfaceName>System.Collections.IStructuralComparable</InterfaceName></Interface><Interface><InterfaceName>System.Collections.IStructuralEquatable</InterfaceName></Interface><Interface><InterfaceName>System.IComparable</InterfaceName></Interface><Interface><InterfaceName>System.ITuple</InterfaceName></Interface></Interfaces><Docs><typeparam name="T1">To be added.</typeparam><typeparam name="T2">To be added.</typeparam><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>A tuple is a data structure that has a specific number and sequence of values. The <see cref="T:System.Tuple`2" /> class represents a 2-tuple, or pair, which is a tuple that has two components. A 2-tuple is similar to a <see cref="T:System.Collections.Generic.KeyValuePair`2" /> structure.</para><para>You can instantiate a <see cref="T:System.Tuple`2" /> object by calling either the <see cref="M:System.Tuple`2.#ctor(`0,`1)" /> constructor or the static <see cref="M:System.Tuple.Create``2(``0,``1)" /> method. You can retrieve the values of the tuple's components by using the read-only <see cref="P:System.Tuple`2.Item1" /> and <see cref="P:System.Tuple`2.Item2" /> instance properties.</para><para>Tuples are commonly used in four different ways:</para><list type="bullet"><item><para>To represent a single set of data. For example, a tuple can represent a record in a database, and its components can represent that record's fields.</para></item><item><para>To provide easy access to, and manipulation of, a data set. The following example defines an array of <see cref="T:System.Tuple`2" /> objects that contain the names of students and their corresponding test scores. It then iterates the array to calculate the mean test score.</para><para>code reference: System.Tuple`2.Class#1</para></item><item><para>To return multiple values from a method without the use of out parameters (in C#) or ByRef parameters (in Visual Basic). For example, the following example uses a <see cref="T:System.Tuple`2" /> object to return the quotient and the remainder that result from integer division.</para><para>code reference: System.Tuple`2.Item1#1</para></item><item><para>To pass multiple values to a method through a single parameter. For example, the <see cref="M:System.Threading.Thread.Start(System.Object)" /> method has a single parameter that lets you supply one value to the method that the thread executes at startup. If you supply a <see cref="T:System.Tuple`2" /> object as the method argument, you can supply the thread’s startup routine with two items of data.</para></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Represents a 2-tuple, or pair. </para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public Tuple (T1 item1, T2 item2);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(!T1 item1, !T2 item2) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="item1" Type="T1" /><Parameter Name="item2" Type="T2" /></Parameters><Docs><param name="item1">To be added.</param><param name="item2">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member><Member MemberName="Equals"><MemberSignature Language="C#" Value="public override bool Equals (object obj);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object obj) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="obj" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <paramref name="obj" /> parameter is considered to be equal to the current instance under the following conditions:</para><list type="bullet"><item><para>It is a <see cref="T:System.Tuple`2" /> object.</para></item><item><para>Its two components are of the same types as the current instance.</para></item><item><para>Its two components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component. </para></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a value that indicates whether the current <see cref="T:System.Tuple`2" /> object is equal to a specified object.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>true if the current instance is equal to the specified object; otherwise, false.</para></returns><param name="obj"><attribution license="cc4" from="Microsoft" modified="false" />The object to compare with this instance.</param></Docs></Member><Member MemberName="GetHashCode"><MemberSignature Language="C#" Value="public override int GetHashCode ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters /><Docs><remarks>To be added.</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns the hash code for the current <see cref="T:System.Tuple`2" /> object.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A 32-bit signed integer hash code.</para></returns></Docs></Member><Member MemberName="Item1"><MemberSignature Language="C#" Value="public T1 Item1 { get; }" /><MemberSignature Language="ILAsm" Value=".property instance !T1 Item1" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>T1</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>You can dynamically determine the type of the <see cref="P:System.Tuple`2.Item1" /> component in one of two ways:</para><list type="bullet"><item><para>By calling the GetType method on the value that is returned by the <see cref="P:System.Tuple`2.Item1" /> property. </para></item><item><para>By retrieving the <see cref="T:System.Type" /> object that represents the <see cref="T:System.Tuple`2" /> object, and retrieving the first element from the array that is returned by its <see cref="M:System.Type.GetGenericArguments" /> method.</para></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the value of the current <see cref="T:System.Tuple`2" /> object's first component.</para></summary></Docs></Member><Member MemberName="Item2"><MemberSignature Language="C#" Value="public T2 Item2 { get; }" /><MemberSignature Language="ILAsm" Value=".property instance !T2 Item2" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>T2</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>You can dynamically determine the type of the <see cref="P:System.Tuple`2.Item2" /> component in one of two ways:</para><list type="bullet"><item><para>By calling the GetType method on the value that is returned by the <see cref="P:System.Tuple`2.Item2" /> property. </para></item><item><para>By retrieving the <see cref="T:System.Type" /> object that represents the <see cref="T:System.Tuple`2" /> object, and retrieving the second element from the array that is returned by its <see cref="M:System.Type.GetGenericArguments" /> method.</para></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the value of the current <see cref="T:System.Tuple`2" /> object's second component.</para></summary></Docs></Member><Member MemberName="System.Collections.IStructuralComparable.CompareTo"><MemberSignature Language="C#" Value="int IStructuralComparable.CompareTo (object other, System.Collections.IComparer comparer);" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.Collections.IStructuralComparable.CompareTo(object other, class System.Collections.IComparer comparer) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="other" Type="System.Object" /><Parameter Name="comparer" Type="System.Collections.IComparer" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Tuple`2" /> instance is cast to an <see cref="T:System.Collections.IStructuralComparable" /> interface.</para><para>Although this method can be called directly, it is most commonly called by collection sorting methods that include <see cref="T:System.Collections.IComparer" /> parameters to order the members of a collection., For example, it is called by the <see cref="M:System.Array.Sort(System.Array,System.Collections.IComparer)" /> method and the <see cref="M:System.Collections.SortedList.Add(System.Object,System.Object)" /> method of a <see cref="T:System.Collections.SortedList" /> object that is instantiated by using the <see cref="M:System.Collections.SortedList.#ctor(System.Collections.IComparer)" /> constructor.</para><block subset="none" type="note"><para>The <see cref="M:System.Tuple`2.System#Collections#IStructuralComparable#CompareTo(System.Object,System.Collections.IComparer)" /> method is intended for use in sorting operations. It should not be used when the primary purpose of a comparison is to determine whether two objects are equal. To determine whether two objects are equal, call the <see cref="M:System.Tuple`2.System#Collections#IStructuralEquatable#Equals(System.Object,System.Collections.IEqualityComparer)" /> method.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Compares the current <see cref="T:System.Tuple`2" /> object to a specified object by using a specified comparer, and returns an integer that indicates whether the current object is before, after, or in the same position as the specified object in the sort order.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A signed integer that indicates the relative position of this instance and <paramref name="other" /> in the sort order, as shown in the following table.</para><list type="table"><listheader><item><term><para>Value</para></term><description><para>Description</para></description></item></listheader><item><term><para>A negative integer</para></term><description><para>This instance precedes <paramref name="other" />.</para></description></item><item><term><para>Zero</para></term><description><para>This instance and <paramref name="other" /> have the same position in the sort order.</para></description></item><item><term><para>A positive integer</para></term><description><para>This instance follows <paramref name="other" />.</para></description></item></list></returns><param name="other"><attribution license="cc4" from="Microsoft" modified="false" />An object to compare with the current instance.</param><param name="comparer"><attribution license="cc4" from="Microsoft" modified="false" />An object that provides custom rules for comparison.</param></Docs></Member><Member MemberName="System.Collections.IStructuralEquatable.Equals"><MemberSignature Language="C#" Value="bool IStructuralEquatable.Equals (object other, System.Collections.IEqualityComparer comparer);" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.IStructuralEquatable.Equals(object other, class System.Collections.IEqualityComparer comparer) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="other" Type="System.Object" /><Parameter Name="comparer" Type="System.Collections.IEqualityComparer" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Tuple`2" /> instance is cast to an <see cref="T:System.Collections.IStructuralEquatable" /> interface.</para><para>The <see cref="M:System.Tuple`2.System#Collections#IStructuralEquatable#Equals(System.Object,System.Collections.IEqualityComparer)" /> implementation is called only if <paramref name="other" /> is not null, and if it can be successfully cast (in C#) or converted (in Visual Basic) to a <see cref="T:System.Tuple`2" /> object whose components are of the same types as the current instance. The <see cref="M:System.Tuple`2.System#Collections#IStructuralEquatable#Equals(System.Object,System.Collections.IEqualityComparer)" /> method first passes the <see cref="P:System.Tuple`2.Item1" /> values of the <see cref="T:System.Tuple`2" /> objects to be compared to the <see cref="M:System.Collections.IEqualityComparer.Equals(System.Object,System.Object)" /> implementation. If this method call returns true, the method is called again and passed the <see cref="P:System.Tuple`2.Item2" /> values of the two <see cref="T:System.Tuple`2" /> objects.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a value that indicates whether the current <see cref="T:System.Tuple`2" /> object is equal to a specified object based on a specified comparison method.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>true if the current instance is equal to the specified object; otherwise, false.</para></returns><param name="other"><attribution license="cc4" from="Microsoft" modified="false" />The object to compare with this instance.</param><param name="comparer"><attribution license="cc4" from="Microsoft" modified="false" />An object that defines the method to use to evaluate whether the two objects are equal.</param></Docs></Member><Member MemberName="System.Collections.IStructuralEquatable.GetHashCode"><MemberSignature Language="C#" Value="int IStructuralEquatable.GetHashCode (System.Collections.IEqualityComparer comparer);" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.Collections.IStructuralEquatable.GetHashCode(class System.Collections.IEqualityComparer comparer) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="comparer" Type="System.Collections.IEqualityComparer" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Tuple`2" /> instance is cast to an <see cref="T:System.Collections.IStructuralEquatable" /> interface.</para><para>The method simply wraps a call to the <paramref name="comparer" /> object's <see cref="M:System.Collections.IEqualityComparer.GetHashCode(System.Object)" /> implementation.</para><para>The algorithm used to compute the hash code should return the same hash code for two <see cref="T:System.Tuple`2" /> objects that are considered to be equal.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the hash code for the current <see cref="T:System.Tuple`2" /> object by using a specified computation method.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A 32-bit signed integer hash code.</para></returns><param name="comparer"><attribution license="cc4" from="Microsoft" modified="false" />An object whose <see cref="M:System.Collections.IEqualityComparer.GetHashCode(System.Object)" />  method calculates the hash code of the current <see cref="T:System.Tuple`2" /> object.</param></Docs></Member><Member MemberName="System.IComparable.CompareTo"><MemberSignature Language="C#" Value="int IComparable.CompareTo (object obj);" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.IComparable.CompareTo(object obj) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="obj" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Tuple`2" /> instance is cast to an <see cref="T:System.IComparable" /> interface.</para><para>This method provides the <see cref="M:System.IComparable.CompareTo(System.Object)" /> implementation for the <see cref="T:System.Tuple`2" /> class. Although the method can be called directly, it is most commonly called by the default overloads of collection sorting methods, such as <see cref="M:System.Array.Sort(System.Array)" /> and <see cref="M:System.Collections.SortedList.Add(System.Object,System.Object)" />, to order the members of a collection.</para><block subset="none" type="note"><para>The <see cref="M:System.Tuple`2.System#IComparable#CompareTo(System.Object)" /> method is intended for use in sorting operations. It should not be used when the primary purpose of a comparison is to determine whether two objects are equal. To determine whether two objects are equal, call the <see cref="M:System.Tuple`2.Equals(System.Object)" /> method.</para></block><para>The <see cref="M:System.Tuple`2.System#IComparable#CompareTo(System.Object)" /> method uses the default object comparer to compare each component.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Compares the current <see cref="T:System.Tuple`2" /> object to a specified object and returns an integer that indicates whether the current object is before, after, or in the same position as the specified object in the sort order.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A signed integer that indicates the relative position of this instance and <paramref name="obj" /> in the sort order, as shown in the following table.</para><list type="table"><listheader><item><term><para>Value</para></term><description><para>Description</para></description></item></listheader><item><term><para>A negative integer</para></term><description><para>This instance precedes <paramref name="obj" />.</para></description></item><item><term><para>Zero</para></term><description><para>This instance and <paramref name="obj" /> have the same position in the sort order.</para></description></item><item><term><para>A positive integer</para></term><description><para>This instance follows <paramref name="obj" />.</para></description></item></list></returns><param name="obj"><attribution license="cc4" from="Microsoft" modified="false" />An object to compare with the current instance.</param></Docs></Member><Member MemberName="System.ITuple.ToString"><MemberSignature Language="C#" Value="string ITuple.ToString ();" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance string System.ITuple.ToString() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Parameters /><Docs><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks></Docs></Member><Member MemberName="ToString"><MemberSignature Language="C#" Value="public override string ToString ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The string returned by this method takes the form (Item1, Item2), where Item1 and Item2 represent the values of the <see cref="P:System.Tuple`2.Item1" /> and <see cref="P:System.Tuple`2.Item2" /> properties. If either property value is null, it is represented as <see cref="F:System.String.Empty" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a string that represents the value of this <see cref="T:System.Tuple`2" /> instance.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The string representation of this <see cref="T:System.Tuple`2" /> object.</para></returns></Docs></Member></Members></Type>