2007-03-28 Chris Toshok <toshok@ximian.com>
[mono-project.git] / mcs / errors / cs0120-2.cs
blob7a117afb22e60d3d988bf4b4c82266a2135606f1
1 // cs0120-2.cs: `Test.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;