//Return value more then one by using Tuple
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
public Tuple<string, int, string> ReturnMorethenOneValue()
{
return new Tuple<string, int, string>("Abrar Ahmad Ansari", 25, "Bangalore");
}
static void Main(string[] args)
{
var objTuple = new Program().ReturnMorethenOneValue();
Console.WriteLine("Name: " + objTuple.Item1);
Console.WriteLine("Age: " + objTuple.Item1);
Console.WriteLine("City: " + objTuple.Item1);
Console.ReadLine();
}
}
}In this code we will see how to Return more then one value by using Tuple.
