blob: 5bdec376e495ab21dab427c8c3aad4e48b6fa0d3 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
using System;
using System.Reflection;
class A1 : Attribute
{
public float F;
public float UL;
public A1 (float f)
{
this.F = f;
}
public A1 (ulong ul)
{
this.UL = ul;
}
}
[A1 (45234.567f)]
class T1
{
}
[A1 (uint.MaxValue + (ulong)1)]
class T2
{
}
class Test
{
public static int Main ()
{
var A1 = typeof (T1).GetCustomAttributes (false) [0] as A1;
if (A1.F != 45234.567f)
return 1;
A1 = typeof (T2).GetCustomAttributes (false) [0] as A1;
if (A1.UL != uint.MaxValue + (ulong)1)
return 2;
return 0;
}
}
|