Created
May 18, 2010 16:39
-
-
Save jhollingworth/405207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Song | |
{ | |
public void Sing() | |
{ | |
Wall wall = new Wall(); | |
wall.Beers.Add(new Beer("Peroni")); | |
foreach (Beer beer in wall.Beers) | |
{ | |
Console.WriteLine(beer.Name); | |
} | |
} | |
} | |
public class Beer | |
{ | |
public string Name { get; set; } | |
public Beer(string name) | |
{ | |
Name = name; | |
} | |
} | |
public class Wall | |
{ | |
public List<Beer> Beers { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment