- using System;
-
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Int32 tmp = 0;
-
- Console.WriteLine("Int32.TryParse(\"テスト\", out tmp) → " + Int32.TryParse("テスト", out tmp));
- Console.WriteLine("out → " + tmp);
-
- Console.WriteLine("");
-
- Console.WriteLine("Int32.TryParse(\"テスト\", out tmp) → " + Int32.TryParse("1", out tmp));
- Console.WriteLine("out → " + tmp);
-
- Console.WriteLine("");
-
- Console.WriteLine("Int32.TryParse(\"テスト\", out tmp) → " + Int32.TryParse("-1", out tmp));
- Console.WriteLine("out → " + tmp);
-
- Console.ReadLine();
- }
- }
- }
|