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
[loader] LoadFrom of problematic images should reprobe
[mono-project.git]
/
mcs
/
errors
/
cs0030-10.cs
blob
e83368382972c839fb9c621c3775ce6cd09c66fe
1
// CS0030: Cannot convert type `TestCase.MyEnum' to `TestCase.OSType'
2
// Line: 9
3
4
public class
TestCase
5
{
6
static void
Main
()
7
{
8
MyEnum me
=
MyEnum
.
Value1
;
9
OSType os
= (
OSType
)
me
;
10
}
11
12
struct
OSType
{
13
int value
;
14
15
public int
Value
{
16
get
{ return Value; }
17
}
18
19
public
OSType
(
int value
)
20
{
21
this
.
value
=
value
;
22
}
23
24
public static implicit operator
OSType
(
int
i
)
25
{
26
return new
OSType
(
i
);
27
}
28
}
29
30
enum
MyEnum
{
31
Value1
32
}
33
}