31
1
using System;
2
using System.Collections.Generic;
3
namespace TulesDemo
4
{
5
public class Program
6
{
7
public static void Main()
8
{
9
var values = new List<double>() { 1, 1, 1, 1, 1 };
10
Tuple<int, string> t = Calulate(values);
11
Console.WriteLine("There are {0} dogs are in my {1}", t.Item1.ToString(), t.Item2);
12
}
13
14
//The function return type as Tuple<int, string>
15
private static Tuple<int, string> Calulate(IEnumerable<double> values)
16
{
17
int dogCount = 0;
18
foreach (var value in values)
19
{
20
dogCount++;
21
22
}
23
24
//Create the tuple by assigning appropriate values.
25
Tuple<int, string> t = Tuple.Create(dogCount, "Home");
26
27
//Returning the tuple instance
28
return t;
29
}
30
}
31
}
Cached Result
Show Master List
John Bachelor john@gmail.com
David Bachelor david@iu.edu
Anderson Master anderson@iu.edu
=============================================
Show Email Length for all entries
14
12
15
=============================================
Show Only Entries with Bachelor as the Education
John Bachelor john@gmail.com
David Bachelor david@iu.edu
John Bachelor john@gmail.com
David Bachelor david@iu.edu
Anderson Master anderson@iu.edu
=============================================
Show Email Length for all entries
14
12
15
=============================================
Show Only Entries with Bachelor as the Education
John Bachelor john@gmail.com
David Bachelor david@iu.edu