Skip to content

Instantly share code, notes, and snippets.

@JasonBock
Last active May 10, 2022 19:02
Show Gist options
  • Save JasonBock/570bec3f0dc9f2fd6eda4593576ea895 to your computer and use it in GitHub Desktop.
Save JasonBock/570bec3f0dc9f2fd6eda4593576ea895 to your computer and use it in GitHub Desktop.
public static void Drive(IEnumerable<IDriver> drivers)
{
foreach(var driver in drivers)
{
driver.Drive();
}
}
Drive(new IDriver[] { new Golfer(), new Racer() });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment