using System.Collections.Generic;
private static List<Person> People { get; set; }
public static void Main()
foreach (var person in People)
var sb = new StringBuilder();
sb.AppendLine(String.Format("Firstname: {0}", person.FirstName));
sb.AppendLine(String.Format("Secondname: {0}", person.SecondName));
sb.AppendLine(String.Format("Number: {0}", person.Number));
Console.WriteLine(sb.ToString());
private static List<Person> GetPeople()
var people = new List<Person>();
people.Add(new Person { FirstName = "Logan", SecondName = "Herlp", Number = "123456" });
people.Add(new Person { FirstName = "Vipaah", SecondName = "Foo", Number = "1234" });
people.Add(new Person { FirstName = "Foo", SecondName = "Bar", Number = "9876" });
public string FirstName { get; set; }
public string SecondName { get; set; }
public string Number { get; set; }