Updated with review feedback.
[mono.git] / mcs / tests / test-var-01.cs
1
2 // Tests variable type inference with the var keyword when assigning to build-in types
3 using System;
4
5 public class Test
6 {
7         public static int Main ()
8         {
9                 var i = 5;
10                 var b = true;
11                 var s = "foobar";
12                 
13                 if (!b)
14                         return 1;
15                 if (i > 5)
16                         return 2;
17                 if (s != "foobar")
18                         return 3;
19                 
20                 return 0;
21         }
22 }