repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
[mcs.git]
/
errors
/
cs0021-3.cs
blob
c2f43ca9ca8cd149ebe1829a2b5a3c5289067781
1
// cs0021-2.cs: Cannot apply indexing with [] to an expression of type `Foo'
2
// Line: 14
3
4
using
System
;
5
6
public class
Foo
{
7
private int this
[
int
index
]
{ get { return index; }
}
8
}
9
10
public class
Bar
{
11
public static void
Main
()
12
{
13
Foo foo
=
new
Foo
();
14
Console
.
WriteLine
(
foo
[
5
]);
15
}
16
}