forked from abishekaditya/DesignPatterns
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Program.cs
34 lines (31 loc) · 924 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using TemplatePattern.Comparable;
namespace TemplatePattern
{
internal static class Program
{
static void Main()
{
var tea = new Tea();
var coffee = new Coffee();
tea.WantsCondiments = true;
tea.AddSugar = 5;
tea.Prepare();
Console.WriteLine();
coffee.WantsCondiments = true;
coffee.Prepare();
var people = new List<Person> { new Person("Ram", 25), new Person("Abishek", 12), new Person("Ram", 18), new Person("Abishek", 18) };
foreach (var person in people)
{
Console.Write(person);
}
people.Sort();
Console.WriteLine();
foreach (var person in people)
{
Console.Write(person);
}
}
}
}