Is .NET platform independent?

user284291 picture user284291 · Sep 7, 2010 · Viewed 38.1k times · Source

.NET is a language independent platform.

But is it platform independent as well ? How ?

EDIT : I have heard, .NET 4.0 is developed considering plateform independency ! Well, hope it may take over Java, if so !

EDIT : The answer depends upon the way how we define 'platform', like .NET for windows platform and Mono for Java.

But, the question is, don't do we have general development platform which is OS independent !

Does OS independency related to platform independency ?

Answer

Cumbayah picture Cumbayah · Sep 7, 2010

It's really a matter of how you define "platform".

E.g. .NET is platform independent as long as the platform is .NET, the same way that Java is platform independent as long as the platform is Java. That is to say, .NET (and Java) are, in part, platforms in themselves (CLR, JVM). As long as there is an implementation of that platform available for a given physical platform, yes, you can run the compiled code on it independently.

In the end, "platform independence" is, just as "write once, run anywhere", marketing. But in practice, currently, there are JVM implementations available for a lot more concrete platforms than .NET (although initiatives such as the Mono projects aims to change that).