I like C#, but I have to write Java and I really dislike Java as a language. But what is the difference? If we omit structs and interop related stuff, then the resulting C# code should be easily compilable into JVM, isn't it?
So, my question is this - is there a tool that:
- Can compile C# into JVM, provided that the C# code is compatible with JVM and fail the compilation if not?
- Makes it possible to reference Java libraries from such C# code?
Thanks.
EDIT
When I mean the languages are similar, I mean that the basic concepts should be implemented similarly in JVM and MSIL. As for the languages, I find the Java language too verbose and inconvenient to program compared to C# 4.
EDIT2
Another clarification. I am not intending to target both CLR and JVM. At the end of the day, I need JVM. My only problem is that it feels really awkward to program Java after having programmed C# 4, which has all these little things, which are usually no more than syntactic sugar of the compiler, but they make all the difference.