[mcs] C#7 out variable declaration
[mono.git] / mcs / errors / cs0120-2.cs
1 // CS0120: An object reference is required to access non-static member `Test.Add8(int)'
2 // Line: 12
3
4 using System;
5 using System.Threading;
6 using System.Reflection;
7 using System.Reflection.Emit;
8
9 public class Test {
10
11         public Test () : this (Add8(4), 6) {
12                 string hostName = System.Net.Dns.GetHostName ();
13                 Console.WriteLine ("Hostname: " + hostName);
14         }
15
16         public Test (int i, int j) {
17                 Console.WriteLine ("GOT : " + i + " : " + j);
18         }
19
20
21         public static void Main (String[] args) {
22                 Test t = new Test ();
23         }
24
25         private int Add8 (int i) {
26                 return i + 8;
27         }
28
29 }