struct MyStruct {
public int AnInt;
public void IncrementAnInt() => AnInt++;
}
static void IncrementAnInt(ref MyStruct @this) => @this.AnInt++;
static void Test() {
var s = new MyStruct { AnInt = 3 };
s.IncrementAnInt();
IncrementAnInt(ref s);
Console.WriteLine(s.AnInt); // 5
}