summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1690-3.cs
blob: d7e04940e9373a86a1846e0462aa04e94a8b147c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// CS1690: Cannot call methods, properties, or indexers on `A.point' because it is a value type member of a marshal-by-reference class
// Line: 22
// Compiler options: -warn:1 -warnaserror

using System;

public struct Point
{
        public bool this [int i] { set { } }
}

public class A : MarshalByRefObject
{
   public Point point = new Point ();
}

public class Test
{
   public static void Main ()
   {
        A a = new A ();
        a.point [3] = false;
   }
}