bring Mono Security to monotouch
[mcs.git] / tests / test-var-05.cs
blob8e048709cda6cb2c996a5b3641e2f59a3bb94e7e
2 // Tests variable type inference with the var keyword when using the "using" statement
3 using System;
5 public class MyClass : IDisposable
7 private string s;
8 public MyClass (string s)
10 this.s = s;
12 public void Dispose()
14 s = "";
18 public class Test
20 static int Main ()
22 using (var v = new MyClass("foo"))
23 if (v.GetType() != typeof (MyClass))
24 return 1;
26 return 0;