public interface IFoo
{
int SomeInt { get; set; }
}
public struct Foo : IFoo
int IFoo.SomeInt { get; set; }
public void DoSomething()
// Can't do this line
//SomeInt = 42;
(this as IFoo).SomeInt = 42;
public class Program
public static void Main()
Foo f = new Foo();
f.DoSomething();
System.Console.WriteLine($"{(f as IFoo).SomeInt}");