Skip to content

Instantly share code, notes, and snippets.

@benben
Created June 28, 2011 15:55
Show Gist options
  • Save benben/1051461 to your computer and use it in GitHub Desktop.
Save benben/1051461 to your computer and use it in GitHub Desktop.
if (option == "Object1")
{
Object1 obj = new Object1();
}
else if (option == "Object2")
{
Object2 obj = new Object2();
}
else if (option == "AnotherObject")
{
AnotherObject obj = new AnotherObject();
}
else if ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment