what is c#

This is a discussion on what is c# within the C# Programming forums, part of the General Programming Boards category; i was just browsing the boards and i saw this forum, and i was just wondering what exactly c# is ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    176

    what is c#

    i was just browsing the boards and i saw this forum, and i was just wondering what exactly c# is is it an improvement on c++ (i've been programming c++ for a while now) and i just wanted to know is if this is gonna become the new standord and c++ is gonna become obsolete or something crazy like that
    If a mime dies in the woods and no one is around to hear it, does it make a sound?

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    C# is part of the .NET suite of tools put out by Microsoft. It's syntactically similar to Java, and it isn't based on C/C++ at all. I've heard quite a few good things about it, although it currently doesn't have much support under non-Windows OSes (as far as I know). It also is more abstracted than C/C++. I highly doubt that C/C++ will become obsolete for quite a while, with one of the big reasons being that quite a few applications are written/being written in C/C++, and in most cases, it's not worth the expense for a company to convert their software for one language to another, especially if C/C++ allows them to accomplish their task just fine.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    176
    sorry if i misinterpreted, but if c++ is better than c# then why would anyone use it?
    If a mime dies in the woods and no one is around to hear it, does it make a sound?

  4. #4
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    I'm not saying that C++ is better than C#, what I meant was that a big reason that C/C++ will continue to remain in the scene is that there are a lot of developers already experienced in it, and it's not necessarily feasible for companies to go and switch their C/C++ applications over to C# just because it's the new cool language.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  5. #5
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    The reason a lot of people just absolutely love C# is because it allows you to get an application done extremely fast and have it functional as opposed to spending maybe 4 minutes coding a C Win32 Application. Another reason people like it is because C# is a very type-safe language, as opposed to C and C++ which are pretty vulnerable, ergo, I can do this in C# and get '{0:X8}':
    Code:
    System.Console.WriteLn("{0:X8}");
    As opposed to doing this in C and getting some weird memory address that's been pulled off the stack:
    Code:
    printf("0x%08x");
    Let me demonstrate this RAD concept to you.

    In C#, creating a Windows form that is sizable, minimizable and is basically a simple standard Window using Window Forms is this:

    Code:
    using System.Windows.Forms;
    class frm_Test {
        public static void Main(String[] args) {
            Form frm = new Form();
            Application.Run(form);
        }
    }
    While with C/C++ we're looking at this.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    176
    i see, thanks for the info
    If a mime dies in the woods and no one is around to hear it, does it make a sound?

  7. #7
    Registered User
    Join Date
    Apr 2005
    Posts
    67
    MadGuy, don't discourage people to learn C++. The code that you showed for window making in C++ can easily used as a template in another header. Like you import stuff in C# and Java. Open those files and see how huge code is.

    But in a way it's true that .NET and Java makes programmers deal with their problems more and not how to make a window.

  8. #8
    Registered User
    Join Date
    Sep 2005
    Posts
    19
    Its not about discouraging or encouraging. The plain truth with .net and java is that they make life easier for programmers, allowing us to program really complex problems or even day to day problems with efficiency, ease and in a short time span.

    The development is more rapid and very good too.

  9. #9
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    MadGuy, don't discourage people to learn C++.
    Don't discourage people to learn C#. Touche, no?

    If you start reading much about comparisons between C# and C++, you're going to hear as the biggest complaint against C# the belief that it is significantly slower than C++. Understand that this is because most people think that programs written for the .NET framework have to be converted from the .NET intermediate language to native machine code every time it runs. .NET languages are JIT (Just-In-Time) compiled, and there is a subtle difference. Once a program has been JIT compiled on a machine, it doesn't need to be JIT compiled again. I would be surprized if it wasn't possible to set up your install program to JIT compile the program at install-time, not the first run-time. After this, C# is still slightly slower, but differentiating between the two is somehwat ridiculous in all but the most time-sensitive issues. A game with CPU-intensive graphics is the point at which I would start concerning myself with the difference. For regular app-making, I believe that C#'s ability to make a fairly standard program fairly quickly, makes it a superior choice in most situations where the .NET framework is available for use. Speaking of which...

    it currently doesn't have much support under non-Windows OSes (as far as I know).
    There was actually a standard published a few years ago of specifications for this "cross-platform platform" concept. I've forgotten what it's called, but .NET is just the name for Microsoft's implementation of that specification. Mono was a project that gave support (not that well at first, but it has become quite good) for Linux and several other "*nix" systems. They also made a Windows version I believe. Microsoft participated in a project called Rotor that sought to port the framework to BSD systems. Research both - I think you'll be pleasantly surprized at the support .NET's gaining.

  10. #10
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by blackswan
    MadGuy, don't discourage people to learn C++. The code that you showed for window making in C++ can easily used as a template in another header. Like you import stuff in C# and Java. Open those files and see how huge code is.

    But in a way it's true that .NET and Java makes programmers deal with their problems more and not how to make a window.
    That's fairly obvious. My point was however that with .NET those things are prefabricated for you, I'm not saying you couldn't minimize a win32 application with C++ to 7 lines of code and I'm not discouranging people to learn C++, what I'm saying is .NET allows rapid development because the .NET framework has been made for you, as opposed to you coding tons of templates and classes. The .NET framework is ment to minimize the amount of code you write, ergo, they're pretty fully featured for the most part.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  11. #11
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Im pretty new to C#, but I find it's like Visual Basic, except I feel less dirty when I use it.


  12. #12
    C maniac
    Join Date
    Aug 2004
    Location
    Cyberwarping to Middle Earth
    Posts
    154
    Sure looks like Java to me.

  13. #13
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    c# = c pound
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  14. #14
    Registered User
    Join Date
    Apr 2005
    Posts
    67
    If I hate Java, will I hate C# too?

  15. #15
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by blackswan
    If I hate Java, will I hate C# too?
    I'm afraid you have to answer that question yourself.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21