Is c# compiled to machine code, or is it compiled into a platform independent intermediate code?
I am looking at an app that needs to be ported to a single language, and we would like to port it to a portable/fast platform.
Is c# compiled to machine code, or is it compiled into a platform independent intermediate code?
I am looking at an app that needs to be ported to a single language, and we would like to port it to a portable/fast platform.
It's both: it's compiled to intermediate code, deployed, and then compiled to machine code on the machine on which it's installed and/or run.
C# is fast. It's compiled into a byte code that is then translated by a JIT. There's an open source implementation of C# called Mono that works great. I have basic ASP.NET sites up and written in C# on Linux and Mono and they run great.
It doesn't sound like you care how fast C# is, you just want it to be not noticeably slow. For that, the answer is most certainly yes. There are many impressive applications written in C#. Unless you are doing something extremely processor intensive, it shouldn't seem any slower than C++.
Is c# compiled to machine code?
No.
Is it compiled into a platform independent intermediate code?
Yes.
From what I understand, Java tends to be a little faster than C#, but not enough for it to really matter for most applications, while C# tends to require less memory. They tend to be good at similar types of applications when compared to other languages. They usually perform slower than C++, but in some applications they can be faster because of optimizations that the JIT compiler can make. They generally are an order of magnitude faster than languages that are normally purely interpreted, like Perl or Python.
You specifically mentioned C#, but I bring up Java because it is better supported cross-platform, which you also specifically mention. Thanks to Mono, you can do C# developement cross-platform, which now apparently has support for windows forms. However, you may need to be careful if some of the team uses .Net and some of it uses Mono because Mono only supports up to C# 2.0 and Microsoft is currently working on version 4.0 and is fairly aggressive about pushing new features. Java has the exact opposite problem where Sun is very conservative about pushing new features, causing it to lack some of the nice features that C# has, like properties and closures.