Using java code in .Net/c#: namespace issue

Hello.

I'd like to reuse serveral java libs I wrote from within C# programs. For this purpose, I converted several jars to dlls using ikvmc.
After adding "using" directives to my c# sources, I faced an error, complaining that "is" is a keyword.  The reason: One of my Java namespaces contains "is", e.g. "my.namespace.is.not.ok" -> c# does not accept "is" as part of a namespace.

Question: is there a workaround allowing me to still keep the Java namespaces? If not, is there another solution than just altering the Java code?

Thank you,
Johann
Johann2Asked:
Who is Participating?
 
käµfm³d 👽Commented:
Not sure if it works for namespaces, but try prefixing "is" with an @:

e.g.

System.@Is.Something
1
 
Johann2Author Commented:
..yes, it works! Perfect! Thank you very much for your help. :)
Regards,
Johann
0
 
Johann2Author Commented:
Cool! Safes me a lot of work. :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.