-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
23 lines (21 loc) · 831 Bytes
/
Copy pathProgram.cs
File metadata and controls
23 lines (21 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.IO;
using System.Media;
namespace App {
class Program {
// static method
/// <summary>
/// Duck Hunt is a light gun shooter video game developed and published by
/// Nintendo for the Nintendo Entertainment System video game console.
/// :: Nintendo, Hiroji Kiyotake (April 21, 1984)
/// </summary>
/// <param name="args">Input arguments.</param>
static void Main(string[] args) {
Params p = new Params(args);
Stream i = p.Input == null ? Console.OpenStandardInput() : (File.Exists(p.Input) ? new FileStream(p.Input, FileMode.Open) : null);
if (i == null) { Console.Error.WriteLine("err: Invalid input file \"{0}\".", p.Input); return; }
try { (new SoundPlayer(i)).PlaySync(); }
catch (Exception e) { Console.Error.WriteLine("err: {0}", e.Message); return; }
}
}
}