<?xml version="1.0" encoding="iso-8859-1"?>
<ErrorDocumentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ErrorName>CS0121</ErrorName>
  <Examples>
    <string>// cs0121-2.cs: ambigous call selecting between `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-3.cs: The call is ambigious between `IInteger.Add (int)' and `IDouble.Add (double)'
// line 28

// (note, this is taken from `13.2.5 Interface member access')
interface IInteger {
	void Add(int i);
}

interface IDouble {
	void Add(double d);
}

interface INumber: IInteger, IDouble {}

class Number : INumber {
	void IDouble.Add (double d)
	{
		System.Console.WriteLine ("IDouble.Add (double d)");
	}
	void IInteger.Add (int d)
	{
		System.Console.WriteLine ("IInteger.Add (int d)");
	}
	
	static void Main ()
	{
		INumber n = new Number ();
		n.Add(1);               // Error, both Add methods are applicable
		n.Add(1.0);               // Ok, only IDouble.Add is applicable
		((IInteger)n).Add(1);   // Ok, only IInteger.Add is a candidate
		((IDouble)n).Add(1);      // Ok, only IDouble.Add is a candidate
	}
}</string>
    <string>// cs0121.cs: ambigous call when selecting function due to implicit casts
// 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>
  </Examples>
</ErrorDocumentation>