コード例 #1
0
ファイル: Program.cs プロジェクト: MariaTardis/Pharmacy
		static void Main(string[] args) {
			Task2 task = new Task2();
			var inFile = "input.txt";
			var outFile = "output.txt";

			try {
				if (task.SetInputData(inFile))
					task.ThreeClosePharmsToFile(outFile);
			}
			catch (Exception ex) {
				StreamWriter sw = new StreamWriter(outFile);
				sw.Write(ex.Message);
				sw.Close();
			}		
		}	
コード例 #2
0
        static void Main(string[] args)
        {
            Task2 task    = new Task2();
            var   inFile  = "input.txt";
            var   outFile = "output.txt";

            try {
                if (task.SetInputData(inFile))
                {
                    task.ThreeClosePharmsToFile(outFile);
                }
            }
            catch (Exception ex) {
                StreamWriter sw = new StreamWriter(outFile);
                sw.Write(ex.Message);
                sw.Close();
            }
        }