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