Skip to content

Instantly share code, notes, and snippets.

@hsynkrcf
Created November 10, 2022 00:40
Show Gist options
  • Save hsynkrcf/ceca59d8036bc33a723dafccfa528382 to your computer and use it in GitHub Desktop.
Save hsynkrcf/ceca59d8036bc33a723dafccfa528382 to your computer and use it in GitHub Desktop.
YES OCP
class Program
{
static void Main(string[] args)
{
PhoneFactory pf1 = new PhoneFactory();
pf1.MakePhone(new Iphone());
PhoneFactory pf2 = new PhoneFactory();
pf2.MakePhone(new Samsung());
PhoneFactory pf3 = new PhoneFactory();
pf3.MakePhone(new Xiaomi());
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment