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
2007-03-28 Chris Toshok <toshok@ximian.com>
[mono-project.git]
/
mcs
/
errors
/
cs1708.cs
blob
efc47cdb167b880b86b9823132e14428eb283056
1
// cs1708.cs: 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