Thursday, July 30, 2009

What are the advantages and disadvantages of programming in C# Language?

The advantage of using C# is that it is a modern, very high level programming language. It's extremely easy to learn, and has it's own garbage collector. It is a combination of all the other languages, it's composed of different components of different languages, all joined into one.





The disadvantage is that is slower then C or C++, because the code is compiled on the fly. (JIT - Just in time compiling) It is less flexible, and gives the programmer far less control.

What are the advantages and disadvantages of programming in C# Language?
A lot of people compare C# to C++. They are not even in the same boat. The fact is that Microsoft created the C# language in response to Java... mostly due to legal hassles with Sun.





What Sun did was create the concept of "bytecode"... which was somewhere between a "run-time" language like Visual Basic and languages like C/C++ which get compiled into "machine code". This is essentially where you can draw distinct advantages and disadvantages of any programming language.





Going a bit further along in history... what Microsoft did in the process of creating C# was in changing the way existing languages got compiled... namely, Visual Basic. Now, *any* .NET language gets compiled into bytecode, just like Java (though unlike Java, will only run in Windows). Microsoft calls this their Common Language Run-time (or CLR, for short).





The motos being:


Sun -- "Write once, run anywhere"


Microsoft -- "Write in anything, run on Windows"





So to answer your question... if you like Java, love Microsoft, but aren't thrilled with VB, then C# is your language!
Reply:the advantage of programming in C# against it's brother languages such as C++ and C is that it is much easier to learn and you can create programs easily in just few codes. The disadvantage against (again C++ and C) is that C and C++ runs very much faster than C# because the compilation of codes goes two way, from C# code to IL (intermediate language) then from IL to machine code. Unlike in C++ or C, from C++ code, it is interpreted directly to machine code.


No comments:

Post a Comment