<?xml version="1.0"?>
<ErrorDocumentation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorName>CS0121</ErrorName>
  <Examples>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `IList.Count()' and `ICounter.Count()'
// Line: 33

using System;

interface IList 
{
	int Count ();
}

interface ICounter 
{
	int Count ();
}

interface ICollection
{
	int Count { set; }
}

interface IListCounter: IList, ICounter, ICollection
{
}

interface IListCounterNew : IListCounter
{
}

class Test
{
	static void Foo (IListCounterNew t)
	{
		t.Count ();
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `D.Test(string)' and `D.Test(int, string)'
// Line: 16

public class D
{
	static void Test (string a = "s")
	{
	}

	static void Test (int i = 9, string a = "b")
	{
	}

	public static void Main ()
	{
		Test ();
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `IA.Foo()' and `IB.Foo()'
// Line: 27

interface IA
{
	void Foo ();
}

interface IBB : IB
{
}

interface IB
{
	int Foo ();
}

interface IC : IA, IBB
{
}

public class Program
{
	static void Main ()
	{
		IC i = null;
		i.Foo ();
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(int)' and `A.C.X.Test(int)'
// Line: 31

using static A.B.X;
using static A.C.X;

namespace A.B
{
	static class X
	{
		public static void Test (int o)
		{
		}
	}
}

namespace A.C
{
	static class X
	{
		public static int Test (int o)
		{
		}
	}
}

class M
{
	public static void Main ()
	{
		Test (0);
	}
}</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `Test.Foo(string, params object[])' and `Test.Foo(string, params int[])'
// Line: 16

public class Test
{
	static void Foo (string s, params object[] args)
	{
	}
	
	static void Foo (string s, params int[] args)
	{
	}
	
	public static void Main ()
	{
		Foo ("a");
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `Test.Foo&lt;int,int&gt;(int, System.Linq.Expressions.Expression&lt;System.Func&lt;int,int&gt;&gt;)' and `Test.Foo&lt;int,int&gt;(int, System.Func&lt;int,int&gt;)'
// Line: 22

using System;
using System.Linq;
using System.Linq.Expressions;

class Test
{
	static int Foo&lt;T, R&gt; (T t, Expression&lt;Func&lt;T, R&gt;&gt; e)
	{
		return 5;
	}
	
	static int Foo&lt;T, R&gt; (T t, Func&lt;T, R&gt; e)
	{
		return 0;
	}

	static void Main ()
	{
		Foo (1, i =&gt; i);
	}
}

</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `C.M(int, string, string)' and `C.M&lt;int&gt;(int, int?, string)'
// Line: 16

class C
{
	static void M (int x, string y, string z = null)
	{
	}

	static void M&lt;T&gt;(T t, int? u, string z = null)
	{
	}

	static void Main ()
	{
		M (123, null);
	}
}</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `X.Add(float, float, float)' and `X.Add(params decimal[])'
// Line: 7

class X {
	static void Add (float f1, float f2, float f3) {}
	static void Add (params decimal [] ds) {}
	public static void Main () { Add (1, 2, 3); }
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `A.operator +(A, B)' and `B.operator +(A, B)'
// Line: 21

class A
{
	public static A operator + (A a, B b)
	{
		return null;
	}
}

class B
{
	public static A operator + (A a, B b)
	{
		return null;
	}

	static void Main ()
	{
		object o = new A () + new B ();
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `C.M(System.Func&lt;byte,int&gt;)' and `C.M(System.Action&lt;int&gt;)'
// Line: 18

using System;

class C
{
	static void M (Func&lt;byte,int&gt; arg)
	{
	}
	
	static void M (Action&lt;int&gt; arg)
	{
	}

	static void Main()
	{
		M(l =&gt; l.GetHashCode());
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `X.a(int, double)' and `X.a(double, int)'
// Line: 15

class X {
	static void a (int i, double d)
	{
	}

	static void a (double d, int i)
	{
	}

	public static void Main ()
	{
		a (0, 0);
	}
}	
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `A.Foo&lt;int&gt;(int, G&lt;int&gt;)' and `A.Foo&lt;int&gt;(int, object)'
// Line: 18

class A
{
	static int Foo&lt;T&gt; (T a, G&lt;T&gt; y = null)
	{
		return 1;
	}

	static int Foo&lt;T&gt; (T a, object y = null)
	{
		return 2;
	}

	public static int Main ()
	{
		if (A.Foo&lt;int&gt; (99) != 2)
			return 1;

		return 0;
	}
}

class G&lt;U&gt;
{
}
</string>
    <string>// CS0122: The call is ambiguous between the following methods or properties: `Test.Foo(IIn&lt;string&gt;)' and `Test.Foo(IIn&lt;Test&gt;)'
// Line: 22

interface IIn&lt;in T&gt;
{
}

class Test
{

	static void Foo (IIn&lt;string&gt; f)
	{
	}

	static void Foo (IIn&lt;Test&gt; f)
	{
	}

	public static int Main ()
	{
		IIn&lt;object&gt; test = null;
		Foo (test);

		return 0;
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `C.Foo(object, string)' and `C.Foo(int, object)'
// Line: 13

class C
{
	delegate void D (int x, string s);

	static void Foo (object o, string s) { }
	static void Foo (int x, object o) { }

	static void Main ()
	{
		D d = Foo;
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `C.C(double[], int, object)' and `C.C(double[], int, string[])'
// Line: 16

class C
{
	C (double[] o, int i = -1, object ii = null)
	{
	}
	
	C (double[] o, int i = -1, string[] s = null)
	{
	}
	
	public static void Main ()
	{
		new C (null, 1);
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `C.Foo(int, params string[])' and `C.Foo(string[], int)'
// Line: 9

class C
{
	public static void Main ()
	{
		var d = new C ();
		d.Foo (x: 1, y: new [] { "" });
	}

	public void Foo (int x, params string[] y)
	{
	}

	public void Foo (string[] y, int x)
	{
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `C.Foo(byte)' and `C.Foo(int)'
// Line: 18

class C
{
	static int Foo (byte b = 9)
	{
		return 4;
	}
	
	static int Foo (int i = 8)
	{
		return 2;
	}
	
	public static void Main ()
	{
		Foo ();
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `Foo&lt;int,int&gt;.Test(int)' and `Foo&lt;int,int&gt;.Test(int)'
// Line: 23
using System;

public class Foo&lt;T,U&gt;
{
	public void Test (T index)
	{
		Console.WriteLine ("Test 1: {0}", index);
	}

	public void Test (U index)
	{
		Console.WriteLine ("Test 2: {0}", index);
	}
}

class X
{
	static void Main ()
	{
		Foo&lt;int,int&gt; foo = new Foo&lt;int,int&gt; ();
		foo.Test (3);
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `Program.Foo(System.Func&lt;string,dynamic&gt;)' and `Program.Foo(System.Func&lt;object&gt;)'
// Line: 10

using System;

public static class Program
{
	public static void Main ()
	{
		Foo (Bar);
	}

	public static dynamic Bar (string s1)
	{
		return 1;
	}
	
	public static object Bar () {
		return  2;
	}

	public static void Foo (Func&lt;string, dynamic&gt; input)
	{
	}

	public static void Foo (Func&lt;object&gt; input)
	{
	}
}</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `C.Foo(int, long, params string[])' and `C.Foo(long, int, params string[])'
// Line: 9

class C
{
	public static void Main ()
	{
		var d = new C ();
		d.Foo (b: 1, x: "", a : 2);
	}

	public void Foo (int a, long b, params string[] x)
	{
	}

	public void Foo (long b, int a, params string[] x)
	{
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `IList.Count()' and `ICounter.Count()'
// Line: 29

using System;

interface IList 
{
	int Count ();
}

interface ICounter 
{
	int Count ();
}

interface ICollection
{
	int Count { set; }
}

interface IListCounter: IList, ICounter, ICollection
{
}

class Test
{
	static void Foo (IListCounter t)
	{
		t.Count ();
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `IFoo.DoIt()' and `IBar.DoIt()'
// Line: 9

class A : IFooBar {
	static void Main ()
	{
		A a = new A ();
		IFooBar fb = (IFooBar) a;
		fb.DoIt ();
	}

	void IFoo.DoIt ()
	{
		System.Console.WriteLine ("void IFoo.DoIt ()");
	}

	void IBar.DoIt ()
	{
		System.Console.WriteLine ("void IBar.DoIt ()");
	}
}

interface IFoo {
	void DoIt ();
}

interface IBar {
	void DoIt ();
}

interface IFooBar : IFoo, IBar {}</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `V2.operator -(V2, V2)' and `V3.operator -(V3, V3)'
// Line: 45

public struct V3
{
	public float x, y, z;

	public V3 (float ix, float iy, float iz) { x = ix; y = iy; z = iz; }

	static public V3 operator - (V3 lhs, V3 rhs)
	{
		return new V3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z);
	}
}

public struct V2
{
	public float x, y;

	public V2 (float ix, float iy) { x = ix; y = iy; }

	public static implicit operator V2 (V3 v)
	{
		return new V2 (v.x, v.y);
	}

	public static implicit operator V3 (V2 v)
	{
		return new V3 (v.x, v.y, 0);
	}

	static public V2 operator - (V2 lhs, V2 rhs)
	{
		return new V2 (lhs.x - rhs.x, lhs.y - rhs.y);
	}
}

internal class Test
{
	static void Main ()
	{
		V2 a = new V2 ();
		V3 b = new V3 ();

		V2 s = a - b;
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `G&lt;int&gt;.Foo()' and `G&lt;string&gt;.Foo()'
// Line: 18

using static G&lt;int&gt;;
using static G&lt;string&gt;;

class G&lt;T&gt;
{
	public static void Foo ()
	{
	}
}

class Test
{
	public static void Main ()
	{
		Foo ();
	}
}</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `A.Foo(int, string)' and `A.Foo(string, int)'
// Line: 27

class A
{
	public virtual void Foo (int a2, string b2)
	{
	}
	
	public void Foo (string b, int a)
	{
	}
}

class B : A
{
	public override void Foo (int a, string b)
	{
	}
}

class C
{
	public static void Main ()
	{
		B b = new B ();
		b.Foo (a: 1, b: "x");
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `D.Test(bool, string)' and `D.Test(bool, int, string)'
// Line: 16

public class D
{
	static void Test (bool b, string a = "s")
	{
	}

	static void Test (bool b, int i = 9, string a = "b")
	{
	}

	public static void Main ()
	{
		Test (false);
	}
}
</string>
    <string>// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(this int)' and `A.C.X.Test(this int)'
// Line: 37

using System;

namespace A.B
{
	static class X
	{
		public static int Test (this int o)
		{
			return 1;
		}
	}
}

namespace A.C
{
	static class X
	{
		public static int Test (this int o)
		{
			return 2;
		}
	}
}

namespace C
{
	using A.B;
	using static A.C.X;

	class M
	{
		public static int Main ()
		{
			if (1.Test () != 1)
				return 1;

			return 0;
		}
	}
}</string>
  </Examples>
</ErrorDocumentation>