﻿<?xml version="1.0" encoding="utf-8"?>
<ErrorDocumentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ErrorName>CS0120</ErrorName>
  <Examples>
    <string>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;
        }

}
</string>
    <string>// cs0120: `An object reference is required for the nonstatic field, method or property test.method()
// Line: 11

class X {

	void method ()
	{
	}
       
	public static int Main (string [] args){
		X.method ();
		return 1;
	}
}
</string>
    <string>using System;

class X {
	// Public properties and variables.
	public string Y;

	// Constructors.
	public X()
	{
	}

	// Public static methods.
	public static void Main(string[] Arguments)
	{
		X.Y = "";
	}
}






</string>
    <string>// cs0120: Ie, a static method invoking a non-static method
// `An object reference is required for the nonstatic field, method or property test.method()
// Line: 11

class test {

	void method ()
	{
	}
       
	public static int Main (string [] args){
		method ();
		return 1;
	}
}
</string>
  </Examples>
</ErrorDocumentation>