I am working on a project which is written in Java (6.0) and I want to use it in almost all the platforms (iOS/Android/Windows/Windows Phone/Mac/Linux) so I thought of Mono and converting the code to C# but it's 40,000 line of code so it would take so much time to write that. Then I realized that I can use JavaBinding to convert a lot of it and use it but I am not sure if I can use it in Windows or more important iOS.
So basically my question is that "Does java binding converts Java code to C# or it's just a call to the java code? If so, I can't use it for my MonoTouch project"
Two approaches are possible,
Use Sharpen to convert Java code to C# code. A perfect example, is to port Android to C# http://blog.xamarin.com/android-in-c-sharp/
Use IKVM to host Java code on Mono. http://www.ikvm.net/
JavaBinding is only useful for Mono for Android, and I don't think it applies to Windows/iOS.
Related
can anyone help me with using xNet in C# ?
1st thing is when i put source code into my c# code tab it partially hide the xNet and says no need of this ?
what should i do? and if i convert my code to vb.net then is there any alternate of xNet using in VB.Net ?
thanks for answers
XNet is a library, so just add a reference to the dll in visual studio. Here's a how to guide for that. https://msdn.microsoft.com/en-us/library/wkze6zky.aspx
As you are accessing the code as a dll you don't need to worry about what language it is coded in. vb.net and c# can both access the classes it defines.
If you're trying to convert example code which is written in c# to vb.net or vice versa try using an online conversion tool such as http://converter.telerik.com/
Your description of the issue you're facing with the tabs isn't terribly clear, if you need further help it may pay to upload a screenshot.
Unfortunately, it seems that there is no XNET support in VB.net or C# at the current time from NI. You can see this by going to the following link below. If you search 'Visual' on that webpage you will find 'Microsoft Visual C/C++ 6.0', which is an old version of Visual Studio ~1998.
http://download.ni.com/support/softlib//embedded%20networks/NI-XNET/Driver/16.0/readme.htm
If someone creates a dll for this then it would be possible, but most likely it is best to request this from NI directly. They should have the capability to support this and release an updated version of the NI-XNET driver software so they can support C# and VB.net.
Hope this helps. I guess the easiest way is to code it in LabVIEW or the harder way is to acquire a copy of Visual Studio C/C++ 6.0 (since they are no longer sold or available).
Good day!
I try to use pocketsphinx with c# ,but do not know how to do that.
Can you give me some links on examples, or piece of code?
Thank you!
I created an example, ready to use, Windows Phone example.
github
probably also usable for Windows 10 / UWP, otherwise I will make it compatible soon myself in the example.
You can use SWIG to generate a C# wrapper for PocketSphinx lib, like it done here:
https://github.com/cmusphinx/pocketsphinx-unity-demo/tree/master/Assets/Pocketsphinx
There is a piece of code that uses generated wrapper:
https://github.com/cmusphinx/pocketsphinx-unity-demo/blob/master/Assets/TestScript.cs
How can i make my C# console application able to run without .Net frame work
e.g convert it to native c++ code or to some other method so that it will run without .Net frame work.
Edit:
or how can i compile c# code as a native c++ code
I wouldn't recommend using tools because there will be complications and it will be hard to test. However if you want to try there are a lot of tools which you are able to find with a simple google search action. For example here.
I am making an application for editing images. I tried using ImageMagickNET, but can't figure out how to use the API - or if it even works with C#.
Does anybody know ho to use this API or if it works with c#?
ImageMagick.NET appears to be a managed C++ wrapper around the ImageMagick API. As such it should be usable by any .NET language (VB.NET, C#, even IronPython). I don't have experience using it at all but based on what I see in the code in their CodePlex repo I don't see any reason it wouldn't work.
Ok this situation is a bit difficult. But I am trying to embed a Java Jar into a C# form. Not as a new window or new process.
The Jar will be a game that uses the LWJGL library.
The C# Form will be a "wrapper" for it with tools and more.
Anyone have any ideas? Is this even possible?
According to the IKVM Home Page
IKVM.NET is an implementation of Java
for Mono and the Microsoft .NET
Framework. It includes the following
components:
A Java Virtual Machine implemented in
.NET A .NET implementation of the Java
class libraries Tools that enable Java
and .NET interoperability
One would approach it from using a DLL not a jar. Also this sounds like a bit of a security issue.
They're completely different runtimes; you'll need a process for both the CLR and the JVM; no way around that.
You can try the Java to C# converter provided by MS, and then rebuild: http://www.microsoft.com/downloads/details.aspx?FamilyID=46bea47e-d47f-4349-9b4f-904b0a973174&displaylang=en