repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2010-04-13 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git]
/
mcs
/
tests
/
test-329.cs
blob
3ef16470b75db94b78b5d0badd1b3268bbc202ca
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
}