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] Add a special method for XI so the linker does not always have to generate it.
[mono-project.git]
/
mcs
/
errors
/
cs0266-18.cs
blob
2318a150deebadb8ed89e1f5fa12c980703e5bcc
1
// CS0266: Cannot implicitly convert type `B' to `I'. An explicit conversion exists (are you missing a cast?)
2
// Line: 21
3
4
interface
I { }
5
6
class
A
:
I { }
7
8
class
B
9
{
10
public static explicit operator
A
(
B
from
)
11
{
12
return new
A
();
13
}
14
}
15
16
class
App
17
{
18
public static void
Main
()
19
{
20
B b
=
new
B
();
21
I i
=
b
;
22
}
23
}
24