using System; struct Coord { public int X, Y; } public class Test{ Coord Coord { get; set; } public static void Main() { new Test().Coord.X = 42; }}
Standard input is empty
prog.cs(11,20): error CS1612: Cannot modify a value type return value of `Test.Coord'. Consider storing the value in a temporary variable Compilation failed: 1 error(s), 0 warnings
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!