In ilasm/tests:
[mcs.git] / errors / cs0120-2.cs
blob9ec0a35b3f37e438fc76bb55dac9324d7fb8b806
1 // cs0120-2.cs: `Add8(int)': An object reference is required for the nonstatic field, method or property
2 // Line: 12
4 using System;
5 using System.Threading;
6 using System.Reflection;
7 using System.Reflection.Emit;
9 public class Test {
11 public Test () : this (Add8(4), 6) {
12 string hostName = System.Net.Dns.GetHostName ();
13 Console.WriteLine ("Hostname: " + hostName);
16 public Test (int i, int j) {
17 Console.WriteLine ("GOT : " + i + " : " + j);
21 public static void Main (String[] args) {
22 Test t = new Test ();
25 private int Add8 (int i) {
26 return i + 8;