summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0572.cs
blob: a40ddfbddbbf8d274fa9aed9cec9ceeed10f9e9c (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
// CS0572: `Foo': cannot reference a type through an expression. Consider using `Y.Foo' instead
// Line: 13
using System;

class X
{
	private static Y y;

	public static void Main ()
	{
		y = new Y ();

		object o = y.Foo.Hello;
	}
}

class Y
{
	public enum Foo { Hello, World };

	public void Test (Foo foo)
	{
		Console.WriteLine (foo);
	}
}