fork download
  1. using System;
  2.  
  3. struct Coord { public int X, Y; }
  4.  
  5. public class Test
  6. {
  7. Coord Coord { get; set; }
  8.  
  9. public static void Main()
  10. {
  11. new Test().Coord.X = 42;
  12. }
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty