Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi...

This might be a silly question but it confused me a lot. This is an interview question though.

.Net is platform independent or not? and why..

I need a complete answer..
Posted
Comments
comred 15-May-12 3:08am    
Thanks for giving me perfect answers....

No it's not platform independent. Most of the answer you can find directly in http://en.wikipedia.org/wiki/.NET_Framework[^].

However there's a separate project called Mono which tries to tackle this problem. For more information, see: http://en.wikipedia.org/wiki/Mono_(software)[^]
 
Share this answer
 
Comments
VJ Reddy 15-May-12 1:51am    
My 5!
Wendelius 15-May-12 2:05am    
Thanks :)
comred 15-May-12 3:03am    
good answer!!
Wendelius 16-May-12 11:37am    
Thanks :)
comred 15-May-12 3:09am    
* * * * *
The answer to this is YES and NO. let me explain how. first lets talk about the cross platform JAVA.

java is said to be cross platform and the real reason for this is the availability of the JVM for various platforms.

.net framework basically is equivalent to the JVM and supports many languages on top of it (unlike Java). So if we could find the framework that we can install on other OS then the applications can run on all such platforms.

Now whether we can do this or not? Well there is a framework called mono which is like a subset of .net framework but it has a LOT of things that are there in .net framework. We can install mono on a linux machine and or even on MAC(some proprietary versions) and then if we ensure that we are using those framework libraries that are common in mono and .net framework then our application will work on multiple platforms.

So, the one word answer for the question would be YES. but you will need more details to get the complete picture. what i described above is just a bit of it.
 
Share this answer
 
Comments
Wendelius 15-May-12 2:06am    
Good answer, 5.
comred 15-May-12 3:04am    
Bingo... * * * * *
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).

Also check some similar discussions:
Is .Net platform independent?[^]
Is .Net Platform independent or not ?[^]
Is .Net Platform independent ?[^]
Is .NET platform independent?[^]
 
Share this answer
 
Comments
Wendelius 15-May-12 2:06am    
Good answer, 5.
Prasad_Kulkarni 15-May-12 2:27am    
Thank You Mika!
member60 15-May-12 2:24am    
+5
Prasad_Kulkarni 15-May-12 2:27am    
Thank You! :)
comred 15-May-12 3:05am    
Nice n brief... thanks..
YES but it is partially platform independent . suppose you build a .NET application on Windows and run that application on Linux.
You just have to install Linux version of .NET runtime on the Linux.
see
Mono Project
 
Share this answer
 
Comments
VJ Reddy 15-May-12 1:52am    
My 5!
uspatel 15-May-12 2:06am    
Thanks...
comred 15-May-12 3:04am    
So mono can make .net platform independent right....
uspatel 15-May-12 3:11am    
Yes....
 
Share this answer
 
Comments
VJ Reddy 15-May-12 1:52am    
My 5!
.Net apps and .Net is Platform Independent
but the .Net framework is Platform dependent.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900