.NET 4定义了8个Tuple类,和一个静态Tuple类
---------------------------------------------------------------------返回多个值
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { Console.WriteLine("{0}*{1}={2}",Divide(1, 2).Item1, Divide(1, 2).Item2, Divide(1, 2).Item3);//1*2=2 Console.ReadKey(); } public static Tuple<int, int,int> Divide(int i, int j)// { return Tuple.Create<int, int, int>(i, j, i * j);//返回三个值 } } }