projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
codeowners update
[mono.git]
/
mcs
/
errors
/
cs0266-18.cs
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