a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
24 lines
489 B
C#
24 lines
489 B
C#
public interface IFoo
|
|
{
|
|
void Foo<T>(ref T? v) where T:struct;
|
|
void Foo<T>(ref T v) where T:new();
|
|
}
|
|
|
|
public struct Point
|
|
{
|
|
int x, y;
|
|
public Point(int x, int y) { this.x = x; this.y = y; }
|
|
}
|
|
|
|
struct TestPoint
|
|
{
|
|
public static void Serialize(IFoo h)
|
|
{
|
|
Point point1 = new Point (0, 1);
|
|
Point? point2 = new Point (1, 2);
|
|
h.Foo (ref point1);
|
|
h.Foo (ref point2);
|
|
}
|
|
public static void Main(){}
|
|
}
|