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
Merge pull request #1821 from iainx/replace-getline
[mono-project.git]
/
mcs
/
errors
/
cs0165-23.cs
blob
8c947a2af53dca26b38c866ce4e8038131c831bf
1
// CS0165: Use of unassigned local variable `retval'
2
// Line: 9
3
4
class
Test
5
{
6
static string
DoStuff
(
string
msg
)
7
{
8
string
retval
;
9
10
switch
(
msg
) {
11
case
"hello"
:
12
retval
=
"goodbye"
;
13
return
retval
;
14
case
"goodbye"
:
15
return
retval
;
16
case
"other"
:
17
retval
=
"other"
;
18
case
""
:
19
return
msg
;
20
}
21
return
""
;
22
}
23
}