// Test from http://joeduffyblog.com/2010/07/01/when-is-a-readonly-field-not-readonly/
public class Program
{
struct S {
public readonly int X;
public S(int x) { X = x; }
public void MultiplyInto(int c, out S target) {
System.Console.WriteLine(this.X);
target = new S(X * c);
System.Console.WriteLine(this.X); // same? it is, after all, readonly.
}
public static void Main()
S s = new S(42);
s.MultiplyInto(10, out s);