<?xml version="1.0"?>
<ErrorDocumentation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorName>CS0411</ErrorName>
  <Examples>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(T)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 14
// Compiler options: -unsafe

class C
{
	static void Foo&lt;T&gt; (T t)
	{
	}

	unsafe static void Test ()
	{
		int* i = null;
		Foo (i);
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(I&lt;T&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 17

interface I&lt;T&gt;
{
}

class C : I&lt;long&gt;, I&lt;int&gt;
{
	static void Foo&lt;T&gt; (I&lt;T&gt; i)
	{
	}

	static void Main ()
	{
		C c = new C ();
		Foo (c);
	}
}
</string>
    <string>// CS0411: The type arguments for method `Foo&lt;U&gt;.DoSomething&lt;U&gt;(System.Func&lt;U,U&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 15

using System;

public class Foo&lt;T&gt;
{
	public void DoSomething&lt;U&gt; (Func&lt;U, T&gt; valueExpression) { }
}

public class Bar
{
	protected void DoAnything&lt;T, U&gt; (U value)
	{
		new Foo&lt;U&gt; ().DoSomething (value);
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(T[], T[])' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 12

class C
{
	public static void Foo&lt;T&gt; (T[] t1, T[] t2)
	{
	}
	
	public static void Main ()
	{
		Foo (new int[0], new byte[0]);
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(ref T, ref T)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 14

class C
{
	public static void Foo&lt;T&gt; (ref T t1, ref T t2)
	{
	}
	
	public static void Main ()
	{
		string s = "a";
		object o = null;
		Foo (ref s, ref o);
	}
}
</string>
    <string>// CS0411: The type arguments for method `M.Foo&lt;T&gt;(System.Func&lt;T&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 14

using System;

class M
{
	static void Foo&lt;T&gt; (Func&lt;T&gt; t)
	{
	}
	
	public static void Main ()
	{
		Foo (delegate { throw new Exception("foo"); });
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.Test&lt;T&gt;(System.Func&lt;T&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 14

using System;

interface IB
{
}

class C
{
	public static void Main ()
	{
		Test (() =&gt; { if (true) return (C) null; return (IB) null; });
	}
	
	static void Test&lt;T&gt; (Func&lt;T&gt; f)
	{
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(T)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 10

using System;

class C
{
	static void Main ()
	{
		Foo (new TypedReference ());
	}

	static void Foo&lt;T&gt; (T arg)
	{
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.TestCall&lt;T&gt;(int)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 13

class C
{
	static void TestCall&lt;T&gt; (int i)
	{
	}
	
	public static void Main ()
	{
		dynamic d = 0;
		TestCall (d);
	}
}
</string>
    <string>// CS0411: The type arguments for method `Test&lt;float&gt;.Foo&lt;V,W&gt;(V, V)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 15

class Test&lt;A&gt;
{
	public void Foo&lt;V,W&gt; (V v, V w)
	{ }
}

class X
{
	static void Main ()
	{
		Test&lt;float&gt; test = new Test&lt;float&gt; ();
		test.Foo (8, 9);
	}
}

</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(System.Func&lt;T&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 14

using System;

class C
{
	static void Foo&lt;T&gt; (Func&lt;T&gt; a)
	{
	}
	
	static void Main ()
	{
		Foo (() =&gt; Main);
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(System.Func&lt;T&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 10

using System;

class C
{
	static void Main ()
	{
		Foo (() =&gt; () =&gt; 1);
	}

	static void Foo&lt;T&gt; (Func&lt;T&gt; arg)
	{
	}
}
</string>
    <string>// CS0411: The type arguments for method `AsyncTypeInference.Test2&lt;T&gt;(System.Func&lt;int,T&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 11

using System;
using System.Threading.Tasks;

class AsyncTypeInference
{
	public static int Main ()
	{
		Test2 (async l =&gt; { await TT (); return null; } );
		return 0;
	}
	
	static Task TT ()
	{
		return Task.Factory.StartNew (() =&gt; 2);
	}

	static void Test2&lt;T&gt; (Func&lt;int, T&gt; arg)
	{
		arg (0);
	}
}
</string>
    <string>// CS0411: The type arguments for method `System.Linq.Enumerable.OrderBy&lt;TSource,TKey&gt;(this System.Collections.Generic.IEnumerable&lt;TSource&gt;, System.Func&lt;TSource,TKey&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 20

using System.Collections.Generic;
using System.Linq;

public class C
{
	public string Name ()
	{
		return "aa";
	}
}

class Z
{
	void Test ()
	{
		List&lt;C&gt; l = null;
		var r = l.OrderBy (f =&gt; f.Name).ToList ();
	}
}</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(out T)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 8
// Compiler options: -langversion:experimental

public class C
{
	public static void Main ()
	{
		Foo (out var y);
	}

	static void Foo&lt;T&gt; (out T t)
	{
		t = default (T);
	}
}</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(System.Func&lt;T&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 10

using System;

public class C
{
    public static void Main ()
    {
        Foo (() =&gt; throw null);
    }

    static void Foo&lt;T&gt; (Func&lt;T&gt; arg)
    {
    }
}</string>
    <string>// CS0411: The type arguments for method `C.Foo&lt;T&gt;(T)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 12

class C
{
	static void X ()
	{
	}
	
	static void Foo&lt;T&gt; (T t)
	{
		Foo(X ());
	}
}
</string>
    <string>// CS0411: The type arguments for method `Hello.World&lt;U&gt;(IFoo&lt;U&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 16
public interface IFoo&lt;T&gt;
{ }

public class Foo : IFoo&lt;int&gt;, IFoo&lt;string&gt;
{ }

public class Hello
{
	public void World&lt;U&gt; (IFoo&lt;U&gt; foo)
	{ }

	public void Test (Foo foo)
	{
		World (foo);
	}
}

class X
{
	static void Main ()
	{
	}
}
</string>
    <string>// CS0411: The type arguments for method `C.Test&lt;TR,TA&gt;(C.Func&lt;TR,TA&gt;, C.Func&lt;TR,TA&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 16


public class C
{
	public delegate T1 Func&lt;T1, T2&gt; (T2 t);
	
   	public static TR Test&lt;TR, TA&gt; (Func&lt;TR, TA&gt; f, Func&lt;TR, TA&gt; f2)
	{
		return default (TR);
	}
	
	public static void Main()
	{
		int s = Test (delegate (int i) { return 0; }, delegate (int i) { return "a"; });
	}
}</string>
    <string>// CS0411: The type arguments for method `Test.Foo&lt;A&gt;(D&lt;A&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 15

delegate void D&lt;T&gt; (T t);

class Test
{
	public static D&lt;A&gt; Foo&lt;A&gt; (D&lt;A&gt; a)
	{
		return null;
	}
	
	public static void Main ()
	{
		Foo (delegate {});
	}
}

</string>
    <string>// CS0411: The type arguments for method `Test&lt;float&gt;.Foo&lt;V&gt;(V, V)' cannot be inferred from the usage. Try specifying the type arguments explicitly
// Line: 15

class Test&lt;A&gt;
{
	public void Foo&lt;V&gt; (V v, V w)
	{ }
}

class X
{
	static void Main ()
	{
		Test&lt;float&gt; test = new Test&lt;float&gt; ();
		test.Foo (8, "Hello World");
	}
}

</string>
  </Examples>
</ErrorDocumentation>