fork download
  1. //Tuple.cs
  2. using System; using System.Linq;
  3. class Program
  4. { static void Main(string[] args)
  5. { int[] a = { 33, 11, 33, 55 };
  6. int[] b = { 789, 123, 456, 135 };
  7. string[] c = { "ЮЮЮ", "ЯЯЯ", "ЭЭЭ", "ЪЪЪ" };
  8.  
  9. Tuple<int, int, string>[] arr = new Tuple<int, int, string>[4];
  10. for (int i = 0; i < arr.Length; i++)
  11. arr[i] = new Tuple<int, int, string>(a[i], b[i], c[i]);
  12. arr = (from item in arr
  13. orderby item.Item3
  14. select item).ToArray();
  15.  
  16. for (int i = 0; i < arr.Length; i++)
  17. Console.Write(arr[i].Item1 + " ");Console.WriteLine();
  18. for (int i = 0; i < arr.Length; i++)
  19. Console.Write(arr[i].Item2 + " ");Console.WriteLine();
  20. for (int i = 0; i < arr.Length; i++)
  21. Console.Write(arr[i].Item3 + " ");Console.WriteLine();
  22. }}
Success #stdin #stdout 0.03s 18020KB
stdin
Standard input is empty
stdout
55 33 33 11 
135 456 789 123 
ЪЪЪ ЭЭЭ ЮЮЮ ЯЯЯ