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

Johann2
Johann2 used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015
Commented:
Not sure if it works for namespaces, but try prefixing "is" with an @:

e.g.

System.@Is.Something

Author

Commented:
..yes, it works! Perfect! Thank you very much for your help. :)
Regards,
Johann

Author

Commented:
Cool! Safes me a lot of work. :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial