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
2009-07-20 Jb Evain <jbevain@novell.com>
[mcs.git]
/
errors
/
cs1622.cs
blob
563889bd59b4298f2e496cb00728b8763ed9fbcd
1
// cs1622.cs: Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration
2
// Line: 11
3
using
System
.
Collections
;
4
5
class
X
{
6
IEnumerator
MyEnumerator
(
int
a
)
7
{
8
if
(
a
==
0
)
9
yield return
1
;
10
else
11
return null
;
12
}
13
14
static void
Main
()
15
{
16
}
17
}