System.Tuple.ToString 方法 
方法描述
返回一个字符串,该字符串表示此 Tuple
语法定义(C# System.Tuple.ToString 方法 的用法) 
public override string ToString()
参数/返回值
| 参数值/返回值 | 参数类型/返回类型 | 参数描述/返回描述 | 
|---|---|---|
| 返回值 | System.String | 此 Tuple | 
提示和注释
此方法返回的字符串采用以下格式 (Item1, Item2, Item3, Item4, Item5, Item6, Item7, Item8…),其中 Item1、Item2、Item3、Item4、Item5、Item6 和 Item7 表示 Item1、Item2、Item3、Item4、Item5、Item6 和 Item7 属性的值。 Item8 表示 Tuple
System.Tuple.ToString 方法例子 
然后,它使用 ToString 方法显示元组的数据。
using System;
class Example
{
    static void Main(string[] args)
    {
        Tuple from1980 = Tuple.Create(1203339, 1027974, 951270);
        var from1910 = new Tuple> 
            (465766, 993078, 1568622, 1623452, 1849568, 1670144, 1511462, from1980);
        var population = new Tuple>> 
            ("Detroit", 1860, 45619, 79577, 116340, 205876, 285704, from1910);
        Console.WriteLine(population.ToString());
    }
    private static void ShowPopulationChange(int year, int newPopulation, int oldPopulation)
    {
        Console.WriteLine("{0,5}  {1,14:N0}  {2,10:P2}", year, newPopulation,
                          ((double)(newPopulation - oldPopulation) / oldPopulation) / 10);
    }
    private static void ShowPopulation(int year, int newPopulation)
    {
        Console.WriteLine("{0,5}  {1,14:N0}  {2,10:P2}", year, newPopulation, "n/a");
    }
}
// The example displays the following output:
//   (Detroit, 1860, 45619, 79577, 116340, 205876, 285704, 465766, 993078, 
//    1568622, 1623452, 1849568, 1670144, 1511462, 1203339, 1027974, 951270)
   
版本信息
.NET Framework 受以下版本支持:4 .NET Framework Client Profile 受以下版本支持:4 受以下版本支持:
适用平台
Windows 7, Windows Vista SP1 或更高版本, Windows XP SP3, Windows Server 2008(不支持服务器核心), Windows Server 2008 R2(支持 SP1 或更高版本的服务器核心), Windows Server 2003 SP2 .NET Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。