linux-packaging-mono/mcs/tests/gtest-variance-15.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

31 lines
368 B
C#

using System;
public class C
{
delegate void D<in T> (T t);
static void M<T> (ref T t, D<T> a)
{
a (t);
}
static void M2<T> (T t, D<T> a)
{
a (t);
}
static void MethodArg (object o)
{
}
public static int Main ()
{
D<object> action = l => Console.WriteLine (l);
string s = "value";
M (ref s, action);
M2 (s, action);
return 0;
}
}