What is Tuple?
Tuple is a type of class which once created, cannot change the type of fields. Tuple is a fixed type ordered sequence. A tuple is an ordered list of elements. In mathematics, an n-tuple is an ordered list of n elements, where n is a non-negative integer, like tuple has stored seven elements and more than seven elements are also possible.
Names,
- A 2 tuple is called a pair.
- A 3 tuple is called a tripple.
- A 4-tuple is called a quadruple.
- A 5-tuple is called a quintuple.
- A 6-tuple is called a sextuple.
- A 7-tuple is called a septuple.
Larger tuples are called n-tuples
Tripple Example:Three items stored in one tuple is called tripple; in this I wrote one example for this tripple,
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TuppleApplication
- {
- class Program
- {
- static void Main(string[] args)
- {
- Tuple<string, int, int> tupple = new Tuple<string, int, int>("blue", 1, 2);
- if(tupple.Item1=="blue")
- {
- Console.WriteLine(tupple.Item1);
- }
- if(tupple.Item2==1)
- {
- Console.WriteLine(tupple.Item2);
- }
- if(tupple.Item3==2)
- {
- Console.WriteLine(tupple.Item3);
- }
- Console.ReadLine();
- }
- }
- }
var tupple=Tupple.create("red",1);

Saravanakumar SekaranPosted May 9, 2017, 11:12 PM EDT
Wow really nice article
Sachin KumarPosted Oct 11, 2016, 10:47 PM EDT
Can you please do spell Check? At many places you have written Tripple/Tupple instead of Tuple and also the tag that added in the end is "Tupple" not Tuple. Please correct this.
SubashPosted Oct 4, 2016, 1:46 AM EDT
Very nice one if you share uses or advantages or benifits of tuple it will very useful
Nagaharitha JinkaPosted Sep 20, 2016, 9:22 PM EDT
Thanks
Sinraj VPosted Sep 20, 2016, 8:47 PM EDT
Nice one..