Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs1690-5.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e49fb02608a6ea88bae7f9bd0d79863cb8f833f1 (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
25
26
27
28
29
// cs1690-4.cs: Cannot call methods, properties, or indexers on `A.point' because it is a value type member of a marshal-by-reference class
// Line: 27
// Compiler options: -warn:1 -warnaserror

using System;

public struct Coord 
{
        public int val; 
}

public struct Point {
	public Coord x;
	public Coord y;
}

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

public class Test
{
   public static void Main ()
   {
        A a = new A ();
        a.point.x.val = 0;
   }
}