- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("処理開始");
-
- String str = "a";
-
- try
- {
- Console.WriteLine("キャスト開始");
- int tmp = Int32.Parse(str);
- Console.WriteLine("ここは実行されない");
- }
- catch (FormatException ex)
- {
- Console.WriteLine("catch");
- }
- finally
- {
- Console.WriteLine("finally");
- }
-
- Console.WriteLine("処理終了");
-
- Console.ReadLine();
- }
- }
- }
|