Skip to content

Instantly share code, notes, and snippets.

@jhollingworth
Created May 18, 2010 16:39
Show Gist options
  • Save jhollingworth/405207 to your computer and use it in GitHub Desktop.
Save jhollingworth/405207 to your computer and use it in GitHub Desktop.
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