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
[mono-api-info] First filter, then order, and use ordinal comparison.
[mono-project.git]
/
mono
/
tests
/
generic-sizeof.2.cs
blob
7db2227c33384c1263952ca44e2dc2cb8456a6bb
1
public class
ClassA
{}
2
public struct
GenStruct
<
T
> {
3
int
field1
;
4
long
field2
;
5
T field3
;
6
}
7
public struct
Struct
{
8
int
field1
;
9
long
field2
;
10
byte
field3
;
11
}
12
13
public class
Gen
<
T
> {
14
public unsafe int
sizeofGenStructT
()
{ return sizeof (Struct); }
15
}
16
17
public class
main
{
18
public static unsafe int
Main
() {
19
Gen
<
ClassA
>
ga
=
new
Gen
<
ClassA
> ();
20
21
if
(
ga
.
sizeofGenStructT
() !=
sizeof
(
Struct
))
22
return
1
;
23
24
return
0
;
25
}
26
}