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
Fix DateTime.Now and CurrentTimeToUtc during DST transition time (#4172)
[mono-project.git]
/
mcs
/
tests
/
gtest-595.cs
blob
65249a527c92304ccc4e070700dab1da9cdb53ae
1
class
MainClass
2
{
3
static class
TypeConverter
<
TIn
,
TOut
>
4
where TIn
:
class
5
where TOut
:
struct
6
{
7
public static bool
Convert
(
TIn input
)
8
{
9
if
(
input
is
TOut
)
10
{
11
return true
;
12
}
13
14
return false
;
15
}
16
}
17
18
public static int
Main
()
19
{
20
object
x
=
3
;
21
if
(
TypeConverter
<
object
,
double
>.
Convert
(
x
))
22
return
1
;
23
24
if
(!
TypeConverter
<
I
,
S
>.
Convert
(
new
S
()))
25
return
2
;
26
27
return
0
;
28
}
29
}
30
31
interface
I
32
{
33
}
34
35
struct
S
:
I
36
{
37
}