projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2005-02-08 Atsushi Enomoto <atsushi@ximian.com>
[mono.git]
/
mcs
/
tests
/
test-329.cs
1
using System;
2
3
[X (null)]
4
class X : Attribute {
5
int ID;
6
public X () {}
7
public X (object o)
8
{
9
if (o == null)
10
ID = 55;
11
}
12
13
static int Main () {
14
object[] attrs = typeof(X).GetCustomAttributes(typeof (X),false);
15
if (attrs.Length != 1)
16
return 2;
17
18
X x = attrs [0] as X;
19
if (x.ID != 55)
20
return 2;
21
22
Console.WriteLine("OK");
23
return 0;
24
}
25
}