projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #5675 from mono/glib-debug-symbols
[mono.git]
/
mcs
/
tests
/
test-primary-ctor-05.cs
1
// Compiler options: -warnaserror -langversion:experimental
2
3
using System;
4
using System.Reflection;
5
6
class A : Attribute
7
{
8
}
9
10
[method:A]
11
class X (int value)
12
{
13
public int f = value;
14
15
public int P { get; } = value;
16
17
public static int Main ()
18
{
19
var x = typeof (X);
20
var attr = x.GetConstructors ()[0].GetCustomAttribute (typeof (A)) as A;
21
if (attr == null)
22
return 2;
23
24
return 0;
25
}
26
}