static void Main() { XmlSerializer xs = new XmlSerializer(typeof(COMPUTER)); COMPUTER cmp = (COMPUTER)xs.Deserialize(File.Open("..\\..\\computer.xml", FileMode.Open)); Console.WriteLine("Graphics card is: {0}", cmp.GRAPHICSCARD); }
public void update(COMPUTER computerType) { listBox.Items.Clear(); switch (computerType) { case COMPUTER.BUSINESS: computerFactory = new ComputerHierarchy.BusinessFactory(); break; case COMPUTER.GAMING: computerFactory = new ComputerHierarchy.GamingFactory(); break; case COMPUTER.MEDIA: computerFactory = new ComputerHierarchy.MediaFactory(); break; } }
public void update(COMPUTER computerType) { listBox.Items.Clear(); switch (computerType) { case COMPUTER.BUSINESS: computerFactory = new ComputerHierarchy.BusinessFactory(); break; case COMPUTER.GAMING: computerFactory = new ComputerHierarchy.GamingFactory(); break; case COMPUTER.MEDIA: computerFactory = new ComputerHierarchy.MediaFactory(); break; } }