I'm passing a reference type (Proto3 generated) to a method to update some properties. When the method returns, the properties have reverted back as if it's not being passed by reference or are immutable.
MyData dest = new MyData();
dest.Num = 1;
MyData src = new MyData();
src.Num = 2;
Console.WriteLine(dest.Num); // num = 1
Test(src, dest);
Console.WriteLine(dest.Num); // num still equals 1
public static void Test(MyData src, MyData dest)
{
// dest.Num = 1 here
dest = src;
// dest.Num = 2 now
}