linux-packaging-mono/mcs/tests/test-primary-ctor-05.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

29 lines
412 B
C#

// Compiler options: -warnaserror
using System;
using System.Reflection;
class A : Attribute
{
}
class X ([field:A] int value)
{
public int f = value;
public int P {
get {
return value;
}
}
public static int Main ()
{
var attr = (A)typeof (X).GetField("value", BindingFlags.NonPublic | BindingFlags.Instance).GetCustomAttribute (typeof (A));
if (attr == null)
return 1;
return 0;
}
}