using System;
public class Program
{
public static void Main()
var f = (IFoo) new Foo();
Func(f);
Console.WriteLine(f.Foo2);
}
static void Func(IFoo f)
f.Foo2 = 42;
interface IFoo
int Foo2 {get; set;}
struct Foo : IFoo
public int Foo2 {get; set;}