static void Main(string[] args) { using (NESEmulator emulator = new NESEmulator()) { emulator.Run(); } }
static void Main(string[] args) { using (OpenFileDialog openFileDialog = new OpenFileDialog { Filter = "iNES ROM Images|*.nes" }) if (openFileDialog.ShowDialog() == DialogResult.OK) { using (NESEmulator emulator = new NESEmulator(openFileDialog.FileName)) emulator.Run(); } }