identifying code that compiles in both Java and C# but runs differently

前端 未结 4 607
轻奢々
轻奢々 2021-01-06 07:27

I am having to port code from Java to C# (and soon the other way round) by copying and pasting and then editing compiler errors. (Please accept that this is necessary; I can

4条回答
  •  萌比男神i
    2021-01-06 08:26

    IKVM is a great option for running java code in C#. You don't need to modify your java code. It simply takes a jar file and generates a .NET dll.

    http://www.ikvm.net/

    Going the other direction, from C# to java, will be difficult, as C# is basically a superset of java. You would need to limit the use of constructs which are not available in java.

提交回复
热议问题