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
[corlib] Add a special method for XI so the linker does not always have to generate it.
[mono-project.git]
/
mcs
/
errors
/
cs1708.cs
blob
9b1286ef43f7a6b5b05dbf955406451423a19bf7
1
// CS1708: `S.array': Fixed size buffers can only be accessed through locals or fields
2
// Line: 27
3
// Compiler options: -unsafe
4
5
using
System
;
6
7
unsafe struct
S
8
{
9
public fixed int
array
[
2
];
10
}
11
12
class
C
13
{
14
unsafe public
S
Get
()
15
{
16
return new
S
();
17
}
18
}
19
20
public class
Tester
21
{
22
public static void
Main
()
{ }
23
24
unsafe void
setName
()
25
{
26
C c
=
new
C
();
27
c
.
Get
().
array
[
1
] =
44
;
28
}
29
}
30