2009-06-05 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs1612-3.cs
blob797276fff4613a2b36f302492ca484d6cbc5f6a0
1 // CS1612: Cannot modify a value type return value of `bar.this[int]'. Consider storing the value in a temporary variable
2 // Line: 19
4 struct foo {
5 public int x;
8 class bar {
9 public foo this [int x] {
10 get { return new foo (); }
11 set { }
15 class main {
16 static void Main ()
18 bar b = new bar ();
19 b [0].x = 5;