Skip to content

Instantly share code, notes, and snippets.

@JasonBock
Last active May 10, 2022 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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