FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Learn to C++, C, and C#





man_nerss
I have learnt C and a little C++ i know the similarities between C and C++, but i do not know anything on C#. What are th application of it?
Help on this would be much appreciated.
Indi
C# is more similar to Java than either C or C++. In the late 90's, Microsoft created special versions of Java - J++ - that worked only with Windows. The reason they did this is because if people started writing all their software in Java, then any software that was available on Windows would be available everywhere. That means that people would not be forced to use Windows in order to use certain applications (as they are now, many people choose Windows only because it is the only operating system that has certain applications). But if people wrote applications in J++, they would only be available on Windows. Of course, Sun freaked out - they wanted people to write programs in Java that would run on any operating system, so that more software would be available for Solaris. Sun sued Microsoft and won, and Microsoft J++ disappeared. Almost immediately, Microsoft unveiled C#, which is pretty much just Microsoft Java in a new package (they later created J#, which is - again, really just C# with the new C# features removed to make it more Java-like again).

So if you know about Java, C#'s applications are almost identical to Java's (non-applet) applications. Java has the Java Runtime Environment (JRE), C# runs on the Common Language Interface (CLI), which is a part of the .Net specification. There is really no functional difference between the two, except that the CLI is more forgiving about allowing other languages to use it (which is why you have so many .Net languages). i don't know of any major projects that use C#, so i can't really speak on what the common uses are. But because C# is .Net and so similar to Java, you could look at the common uses of those things to get an idea.

Take a look at C++, Java and C# in action.

C++
Hello world source code:
Code:
#include <iostream>

int main ()
{
   std::cout << "Hello, world!";
   
   return 0;
}

When you compile this code, it compiles to native code, meaning you get an exe file for the target platform. That exe will run on that platform and any compatible platform without any special requirements.

Java
Hello world source code:
Code:
public class HelloWorldApplication
{
   public static void main(String[] args)
   {
      System.out.println("Hello, world!");
   }
}

When you compile this code, it compiles to Java bytecode, which you need a JRE to run. But it will run on any machine that has a JRE.

C#
Hello world source code:
Code:
class HelloWorldApplication
{
   static void Main()
   {
      System.Console.WriteLine("Hello, world!");
   }
}

When you compile this code, it compiles to .Net bytecode, which you need a .Net implementation to run. But it will run on any machine that has .Net.
clicker-code
The only reason to learn C# is if you have access to an Xbox 360. This is because you can download Microsoft XNA (XNA's Not Acronymed) and make Xbox 360 homebrew games.

But I'm probably being biased here, since I use Python and C++.
Related topics
New to programming..advise please.
Learn C/C++ to make free software?
NEW project (Learn C++)
C#,Visual Basic.NET,Visual Studio.NET Videos
C++, simple things???
FRoMeGame's C++ Questions
Learning C++
What language you want to learn?
New endeavour: C programming language
My Next Language C#
3 Websites To Get Started With Learning C++ Programming Lan
Complete Tutorial LINKS for every language
Want to start making games?
Creating a new Operating System
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.