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] Fix a few NSLogWriter issues. (#13799)
[mono-project.git]
/
mcs
/
tests
/
test-var-01.cs
blob
200436e92fc936c16383e5259885b553cfc8833a
1
2
// Tests variable type inference with the var keyword when assigning to build-in types
3
using
System
;
4
5
public class
Test
6
{
7
public static int
Main
()
8
{
9
var
i
=
5
;
10
var
b
=
true
;
11
var
s
=
"foobar"
;
12
13
if
(!
b
)
14
return
1
;
15
if
(
i
>
5
)
16
return
2
;
17
if
(
s
!=
"foobar"
)
18
return
3
;
19
20
return
0
;
21
}
22
}