Related
Good afternoon,
I thought about writing an application which I may or may not commercialize, depending on how good the final application is. It is like a personal project, with which I hope to learn many more things about programming, for currently I only know most about C and C#. That's why I thought about starting this project as an unmanaged C++ Win32 application. The problem is that it is most dificult to even show a simple window when compared to C#...
How many people/companies use the Win32 API & C++ in today's business world? How does it perform in comparison with C#?
The application in question may eventually be an IDE for a specific language but whith features like command recognition and spell checking already built in.
Thank you very much.
It seems that when performance is needed people are willing to give up C# for C++.
Have a look at this "success" story Lessons from Evernote’s flight from .NET.
On our test hardware, Evernote 4
starts five times faster, and uses
half the memory of Evernote 3.5.
Evernote chose WTL and Chromium Embedded Framework. Basically they've reused Google's Chrome in their application.
For your first project and w/o prior C++ and Win32 experience, I would STRONGLY recommend you use the C# , as it will be easier for you to get something done thereby gaining confidence and skill as you go.
I'm a huge fan of C++ under windows, I've been doing it most of my adult life. That said, if you have no experience of C++, and you want to write a windows application, I'd suggest going with the C# route under .NET. Whilst I love native C++, I really disliked C++/CLI, and the horrid ^ suffix for references.
Given this is a personal project, I wouldn't worry too much about whether businesses use C++ or C#, but I will say that it is easier to find a C# developer these days than it is a C++ developer. And no, I am not favouring one language over the other here, it just appears to be the reality (at least in my experience). As for C++/CLI developers? They're kind of thin on the ground :)
You'll definitely be up and running faster with C# than you would with Visual C++/MFC/some-other-gui, but remember there are certain things you may not be able to do in C# (and have to import the native win32 calls via DllImport), but I doubt you'll come across these fringe cases just yet.
C# is the easy route, and the route most-often pushed by Microsoft. What they don't tell you, though, is that all of their headline products (parts of Visual Studio excepted) are written in C/C++. I'd say, in fact, that most major software packages you are familiar with are written in C/C++.
I'd go with c# too, as it is far more common in a business world (on GUI side at least), than unmanaged c++/win32. You'll also get your desired results faster, especially if you don't know c++.
On the other hand, c++ performs better (if written properly) - so if you are planning some intensive work in your app - maybe c# just won't handle it (but I strongly doubt this is the case).
At last, but not the least - if you are planning for clients, that for some reason do not have and can not get .NET framework (or any other framework, i.e. Java) - then native code is your only solution.
I have only been using C++ for quite a few years, but I have never had to write any programs which required a User Interface. When I did, I tried to learn to use Qt, but found it to be somewhat of a pain and eventually gave up. I recently just started taking a class on C# .NET and in the first week I have already started developing a pretty advanced application for my companies billing system.
If you were already a seasoned C++ veteran and preferred it over C# .NET, then I would say by all means go for it. In this case however, I would strongly recommend you go with C# .NET for quite a few reasons.
1) The time is takes to do something in C# will probably be at the very least about 10x faster than doing it in C++ regardless of the API you used.
2) The learning curve of C++ on top of already trying to write an application with a UI (which is already very difficult in C++) will make this take an extremely long time.
I'm about to start working on a rich-internet-application project for a student organization at my university. I will be the only programmer, and what technologies to use is totally up to me. I've already decided on going with Silverlight, but I'm not sure whether to use C# or F#. Here are some of the things I'm keeping in mind:
C#:
I already know it and have used it extensively with Silverlight at work. I have no F# and little general FP experience.
Some say the OOP paradigm works better for complex stateful UIs.
Maintenance: I'll be in school for three more years, but after that if the app is still in use they may have a better time finding someone else to maintain it if I use a more common language.
C# experience is probably more valuable in the "real world".
F#:
The main reason is I want to learn something new. Functional programming languages seem pretty cool (I find myself using the FP features of C# very often, and think they're the biggest improvement in C# 3.0). I think I'd have a lot more fun if I used F#, but am I being unrealistic in thinking the cost in time and effort might not outweigh the benefits?
In my opinion, when you are a student, you should be trying to put your fingers in as many pots as possible.
The more languages you play with, the more understanding you will have of the "best" ways of doing things in a specific language.
As for "experience" being more valuable in the "real world". Personally I only ever consider true commercial experience when looking at potential candidates. Experience in a language when you're in a job and being paid is extremely different to experience in using a language when learning / studying it. Things you do whilst studying are about gaining skills and knowledge whereas things you do in a commercial environment give you experience in solving real life problems.
Bottom line... play with the cool stuff whilst you still can!
Because you expect to create something useful that will live past your tenure as maintainer, I would suggest writing the majority in C#. What you can do to scratch your new-technology-itch, though, is pull out distinct, well-defined components that don't interact directly with the UI and write those in a separate F# assembly.
I've done something similar with a project that I've open sourced in the past. My fundamental UI logic (in this case, the V-VM parts of the M-V-VM) were in C# because it works so well with WPF technologies. Then, certain functionally-oriented components of the Model itself I broke out into a separate assembly and wrote in F# just to get some limited exposure to the language.
It's not a jump-with-both-feet approach to learning technology, so I probably didn't learn as much as I could have. An F#-only project wouldn't have taught me nearly as much about exposing F# functionality to the greater .Net world in a friendly way, either, though.
No matter what, the key in a situation like this is for you to have fun and enjoy what you're doing. :)
You can make F# business logics project (a dll).
And then the user interface in C#. And in user interface project you can add a reference to the F#-library.
This is a good solution in general when using Silverlight: The power of F# is (functional) programming but currently C# will have a better tool-support.
I know it's not in your list, but if you're interested in learning something new, you might consider GWT - You write your client in Java (which ought to be an easy jump from C#), and then the compiler turns the client side into JavaScript. Should be a bit more cross-platform compatible than Silverlight, and it's an interesting fusion of technologies (CSS, JavaScript, and Java aren't going anywhere in the near future).
I just gave a talk about programming reactive Silverlight applications in F# at London F# user-group meeting. The recording of the talk (and samples) are available here, so you can take a look at that.
Here are a few points you could consider:
I think F# has some very nice features that make programming this kind of applications more elegant than in C# (for example, you can nicely model program as a state machine and encode this direcly in code).
F# is still relatively new, but I believe that there is a decent chance that finding someone familiar with F# after three years will be much easier than today (and finding younger students who are interested to learn something new should be easier :-)).
I was surprised that there is already quite a demand for good F# programmers in the London area. This will be probably different in different places, but I think that F# is becoming a "nice-to-have" feature on CV for some jobs.
I'm presuming that this will be used in an intranet environment. Otherwise, I'd question whether the choice of Silverlight is really the best due to market penetration.
The second point I'd raise is that one of the really key skills for most web developers is Javascript. (Nowadays, that would be Javascript with a library like JQuery to manipulate the DOM, simplify AJAX, etc.) unless the application is particularly complex, there might be some merit in considering DHTML+Javascript as a starting point, and only looking at other technologies if it proves too much for that.
However, if you're set on going down the Silverlight route, then C# is by far the most likely to be supported. If you're still learning, then it's also the route that has the best documentation. F# has some excellent documentation around, but unfortunately not nearly as much as for C#.
You briefly mention the time and cost commitment. Unless you're quite comfortable with functional programming, F# is liable to take significantly longer, in part due to unfamiliarity and in part due to the amount of reference documentation to help you on your way.
While it it undoubtedly good to have knowledge of a range of programming languages under your belt, what's more valuable to most employers is a solid understanding of their language of choice - so diversifying too much can miss that. When looking to learn an unfamiliar programming language starting with something like solving Project Euler problems may present a better way of starting out, rather than diving straight into a major project with a new language. If you start in C#, you can always create an F# project that implements functions more suitable for its focus, and reference it from the C# one, to dip your toe in its waters while not automatically committing a lot of additional time to it.
I intend to write a small application to scratch a personal itch and probably make the life of some colleagues easier. Here is what I have:
10+ years of experience in C
Plenty of experience in programming against the Win16/32 API in C from the Win3.1 to 2000 days.
C library written by myself already doing about 75% of what the application shall do.
What the application shall do:
open a binary, feed it into the mentioned library.
take the resulting text output and feed it into a new Excel Workbook.
apply some formating.
integrate nicely with the Windows environment (availability in "Open With...", remember some stuff using the registry etc.)
(maybe later) before giving the CSV data to Excel, parse it by looking up the meaning of some values in an XML file.
Except for the XML parsing part I have done all of that stuff before including COM / Office Automation in C/Win32. There is a lot of boilerplate code involved, but it is doable and the result will be a pretty small application without the need for an installer.
So why even think about C# / .Net?
no experience with parsing XML
the promise of less boilerplate code for the Windows and Excel stuff (yes, I have done C++ with OWL, MFC, ATL etc. but I am not going there anymore - not for free/fun)
Since I have also experience with C++, VB(not .Net) and a little Java / Objective-C I suppose learning C# will all be about the .Net libraries and not actually about the language.
My considerations so far:
Learning .NET might be fun and might result in less code / first steps in a more modern environment.
Sticking with what I know will lead to a predictable outcome in terms of effort and function (except for the optional XML stuff)
VB looked great at the beginning until the projects where about 80% done, then the pain started and the DLL coding in C. I am concerned history could repeat itself if I choose .Net.
My primary objective is the functionality. Effort is a concern. The XML parsing is optional.
Please advice.
Update: one thing I forgot to mention explicitly is that I am also worried about easy deployment of the tool to my co-workers. With Win32 I am pretty sure I can come up with an EXE file < 1Mb that can be easily emailed and does not require installation. With .Net not so much. Can I create the necessary MSI or whatever in Visual Studio Express (free) or do I need 3rd party tools?
as others have your question mostly covered, I'd just like to quickly comment on your considerations:
Learning .NET might be fun and might result in less code / first steps in a more modern environment.
Totally agreed. It is definitely fun and usually it does result in less code. The investment you make now will certainly benefit you in future projects. It is way faster to program in .Net than in C. Not only it is easier, but it is also safer. You are isolated from many programming errors common in C mostly related to memory mismanagement. You also get a very complete managed API to do stuff you would usually need to build your own framework.
Sticking with what I know will lead to a predictable outcome in terms of effort and function (except for the optional XML stuff)
Hence your indecision. :-)
VB looked great at the beginning until the projects where about 80% done, then the pain started and the DLL coding in C. I am concerned history could repeat itself if I choose .Net. My primary objective is the functionality. Effort is a concern. The XML parsing is optional.
.Net is an entirely different beast from VB. Most of the things you wouldn't be able to do in VB, or at least do them easily, are supported by .Net. For instance, Windows Services are a snap to build in .Net. Socket programming is also supported, but there are very few reasons to do it yourself, as you've got loads of communication APIs with .Net. You've got web-services, .Net Remoting, MSMQ management, and more recently WCF. Proper multithreading is supported by .Net, unlike the idiotic apartment model in VB. In case you really need to go low level, you can also actually use pointers in C#, inside of unsafe code blocks, even though I would never advise to do so.
If you really need to do things in C, then integrating is also relatively easy. You can create COM objects and use interop to work with them from .Net. You can also interact directly with plain ol' dlls using DllImport. Using www.pinvoke.net makes it easier.
When I developed in VB, sometimes I also had to go back to C++ to do stuff that I wasn't able of doing in VB. Since I began programming in .Net, the only extremely rare scenarios I would need to go back to C++ were when I needed to use legacy COM components that used types I was having a hard time to marshal via interop. I wouldn't worry about history repeating itself.
If you're using COM, you may be interested in using C# 4.0 instead of earlier versions - the downside being that it's only in beta. But basically it makes COM stuff somewhat less ugly for various reasons.
I'd expect there to be plenty of good C libraries for XML parsing by now. I would expect the main benefit to actually be the knowledge gained. I doubt that you'll actually produce the code faster for this project, but the next one may well be a lot quicker.
How much do you care about learning new stuff?
It sounds like an ideal project for learning C# & .NET.
You know most of what you need to do so you can use that to gain a base level of understanding of C# & .NET which you can then apply to the stuff you need to learn.
As Rune says though, a key driver could be the timescales. If this is something you need in a hurry then coding it in C & using win32 directly might be the answer.
Sorry I couldn't be more definite.
I think you should use C#. With your experience the learning curve won't be too steep. The code will ultimately be cleaner (and less of it) than you probably could with C/Win32.
There is probably going to be no problem using your existing C-library with the [DllImport] attribute.
It depends. :-) It depends on whether you want to do this quickly or if you want to learn something new. It depends on whether you will be the only maintainer of the code or if others will maintain it in the future. It depends on how complex your xml handling will be and on how complex the COM automation is.
You will probably get a working application quicker if you do it in C than in C#. Both since you have much of the stuff needed already in place and since you know C well.
But this project sounds like a good match for C# and .Net. .Net has great support for XML and COM interop is easy but clumsy in C# (much better in the next version!). So if you are interested in learning C# and .Net this would be a good project to do so.
I would definitely do this in .Net and probably C# (but I am biased). Using .Net would probably result in code that is easier to read and maintain and most probably easier to write. So if you are interested in learning C# I would suggest you go for it!
Edit:
You worry about the size of the executable if you write it in .Net. I doubt that will be a problem, for most if not all of the libraries you will use for a project like this will already be installed on your computer. 1 Mb is rather large for a .Net executable, event for a big project.
a short notice on the installation. .NET is as default xcopy-able so you wouldn't need an installer for the exe to be usable. Mail it around (or with the next release of the .NET framework optionaly leave it on a network share)
You could look at building a hybrid system that uses C++/CLI and C#. C++/CLI provides a nice bridge between the two and lets you easily split different parts of the system between the managed and unmanaged worlds.
Not sure if the setup projects are included in the free versions of visual studio. But you could use clickonce (included with the framework) or WIX (open source XML based msi creation tool).
learning C# will all be about the .Net libraries and not actually about the language
No there are many things you need to learn about the language (delegates , events , generics ...) and also it is object oriented and it manages the memory by itself and yes no pointers :)
anyway C# and .NET are great all you need is some effort to get up to speed
I learned Java in college, and then I was hired by a C# shop and have used that ever since. I spent my first week realizing that the two languages were almost identical, and the next two months figuring out the little differences. For the most part, was I noticing the things that Java had that C# doesn't, and thus was mostly frustrated. (example: enum types which are full-fledged classes, not just integers with a fresh coat of paint) I have since come to appreciate the C# world, but I can't say I knew Java well enough to really contrast the two so I'm curious to get a community cross-section.
What are the relative merits and weaknesses of C# and Java? This includes everything from language structure to available IDEs and server software.
Comparing and contrasting the languages between the two can be quite difficult, as in many ways it is the associated libraries that you use in association with the language that best showcases the various advantages of one of another.
So I'll try to list out as many things I can remember or that have already been posted and note who I think has the advantage:
GUI development (thick or thin). C# combined with .NET is currently the better choice.
Automated data source binding. C# has a strong lead with LINQ, also a wealth of 3rd part libraries also gives the edge
SQL connections. Java
Auto-boxing. Both languages provide it, but C# Properties provides a better design for it in regards to setters and getters
Annotation/Attributes. C# attributes are a stronger and clear implementation
Memory management - Java VM in all the testing I have done is far superior to CLR
Garbage collection - Java is another clear winner here. Unmanaged code with the C#/.NET framework makes this a nightmare, especially when working with GUI's.
Generics - I believe the two languages are basically tied here... I've seen good points showing either side being better. My gut feeling is that Java is better, but nothing logic to base it on. Also I've used C# generics ALLOT and Java generics only a few times...
Enumerations. Java all the way, C# implementation is borked as far as I'm concerned.
XML - Toss up here. The XML and serialization capabilities you get with .NET natively beats what you get with eclipse/Java out of the box. But there are lots of libraries for both products to help with XML... I've tried a few and was never really happy with any of them. I've stuck with native C# XML combined with some custom libraries I made on my own and I'm used to it, so hard to give this a far comparison at this point...
IDE - Eclipse is better than Visual Studio for non-GUI work. So Java wins for non-GUI and Visual Studio wins for GUI...
Those are all the items I can't think off for the moment... I'm sure you can literally pick hundreds of items to compare and contrasting the two. Hopefully this lists is a cross section of the more commonly used features...
One difference is that C# can work with Windows better. The downside of this is that it doesn't work well with anything but Windows (except maybe with Mono, which I haven't tried).
Another thing to keep in mind, you may also want to compare their respective VMs.
Comparing the CLR and Java VM will give you another way to differentiate between the two.
For example, if doing heavy multithreading, the Java VM has a stronger memory model than the CLR (.NET's equivalent).
C# has a better GUI with WPF, something that Java has traditionally been poor at.
C# has LINQ which is quite good.
Otherwise the 2 are practically the same - how do you think they created such a large class library so quickly when .NET first came out? Things have changed slightly since then, but fundamentally, C# could be called MS-Java.
Don't take this as anything more than an opinion, but personally I can't stand Java's GUI. It's just close enough to Windows but not quite, so it gets into an uncanny valley area where it's just really upsetting to me.
C# (and other .Net languages, I suppose) allow me to make programs that perfectly blend into Windows, and that makes me happy.
Of course, it's moot if we're not talking about developing a desktop application...
Java:
Enums in Java kick so much ass, its not even funny.
Java supports generic variance
C#:
C# is no longer limited to Windows (Mono).
The lack of the keyword internal in Java is rather disappointing.
You said:
enum types which are full-fledged classes, not just integers with a fresh coat of paint
Have you actually looked at the output? If you compile an application with enums in in then read the CIL you'll see that an enum is actually a sealed class deriving from System.Enum.
Tools such as Red-Gate (formerly Lutz Roeder's) Reflector will disassemble it as close to the orginal C# as possible so it may not be easily visible what is actually happening under the hood.
As Elizabeth Barrett Browning said: How do I love thee? Let me count the ways.
Please excuse the qualitative (vs. quantitative) aspect of this post.
Comparing these 2 languages (and their associated run-times) is very difficult. Comparisons can be at many levels and focus on many different aspects (such as GUI development mentioned in earlier posts). Preference between them is often personal and not just technical.
C# was originally based on Java (and the CLR on the JRE) but, IMHO, has, in general, gone beyond Java in its features, expressiveness and possibly utility. Being controlled by one company (vs. a committee), C# can move forward faster than Java can. The differences ebb and flow across releases with Java often playing catch up (such as the recent addition of lambdas to Java which C# has had for a long time). Neither language is a super-set of the other in all aspects as both have features (and foibles) the other lacks.
A detailed side-by-side comparison would likely take several 100s of pages. But my net is that for most modern business related programming tasks they are similar in power and utility. The most critical difference is probably in portability. Java runs on nearly all popular platforms, which C# runs mostly only on Windows-based platforms (ignoring Mono, which has not been widely successful). Java, because of its portability, arguably has a larger developer community and thus more third party library and framework support.
If you feel the need to select between them, your best criteria is your platform of interest. If all your work will run only on Windows systems, IMHO, C#/CLR, with its richer language and its ability to directly interact with Windows' native APIs, is a clear winner. If you need cross system portability then Java/JRE is a clear winner.
PS. If you need more portable jobs skills, then IMHO Java is also a winner.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm want to learn a desktop programming language, preferably C, C++ or C#. I'm a PHP/HTML/CSS programmer and I would like to get into desktop applications. I need something pretty powerful and I would like to be able to create applications with Windows GUI's.
What would the Stack Overflow community recommend? Is there any knowledge I should have before diving into these languages?
edit:
A web programmer wants to create Windows applications and you recommend C? What's wrong with you people?!
/edit
Obviously C#.
C# will be easier to get into and will let you build Windows applications using WinForms or WPF and all the new Microsoft toys in .NET. If you know your way around PHP, you should already be familiar with the syntax, object oriented concepts, exception handling, etc.
I suggest you don't complicate your life with C and definitely not with C++ if all you want is to create Windows GUIs. They do provide a good educational experience and they are useful for more advanced things (cross platform development using other toolkits for instance) but at the price of a steeper learning curve and reduced productivity.
Also, if you are a web developer, C# is the only language among the 3 options that you can (realistically, heh) use for the web. ASP.NET is not a bad framework and might be worth investigating too.
"I need something pretty powerful and I would like to be able to create apps with Windows GUI's."
For rich windows GUIs, I'd be tempted to look at the "xaml" variants: WPF (full desktop) and Silverlight (like flash) - this will give you the latest tools etc, and a lot of styling power.
For this, C# would be the primary choice. Managed C++ is an option, but it's more work.
Take a brief look at C first, to the level of writing a few tutorial programs. C is small, well defined and the definite language definition (Kernighan & Ritchie - The C Programming Language) is only a couple of hundred pages long. Although getting your head around pointers and recursion can be a challenge the language itself is sufficiently small that it's possible to know the language completely. One of the pleasures of writing C is it's not too hard to reach the level where one can just code without having to continually refer to documentation to see how to use little know feature x or library function y. Think of learning C as putting the foundations in.
However to actually write useful applications you'll want to use C++ or C#. Which depends on what you wish to write. C# will probably score in most business-orientated cases because of garbage collection and general ease of use, but C++ would score for high performance, low level, or game domains. There's also vast amounts of C++ library code available which can be leveraged relatively easily (and pure C code too which is easily adapted). If your aim is to write something with a particular problem in mind then the availability of such could most likely offset the higher overhead C++ has in just getting things done.
By way of example on this I did a filtered search on 'image' on Sourceforge and returned the following project count
C# : 139
C++: 569
And even with something purposely more business-orientated C++ still scores higher - 'finance'
C# : 12
C++: 32
With anything mathematical or technical the score is heavily weighted against C# - 'fractal'
C# : 4
C++: 44
C : 24 <-- (C++ explicitly excluded)
This is a pretty crude analysis of course, but for example if my aim was to write a desktop fractal generator program then I'd pick C++ over C# as the extra effort involved in handling the UI in C++ would be easily offset by the plethora of example code available in C++. OTOH if I was writing a business application where there was no great advantage to having example code and lots of UI to handle then I'd go for C#.
Afterthought edit: Another reason for at least familiarising yourself with C first is that there's also Objective-C as the main development environment on the Mac and iPhone. Objective-C is C with a very thin wrapper and only really a first cousin to C++, so if you envisage that you might ever be in the position where you want to port code to or develop directly on the Mac then I think you'd find it less confusing if you at least have some feel for how C++ (or C#) builds on C rather than having to 'step sideways' across the tree.
C# vs the others really solve quite different things but given your web background and it's rapid development approach, I'd definitely go with C#
My suggestion is to learn C++. C# is good, but it will prevent you from writing portable code. If you learn C++, you got many choices. In windows you can use Windows Forms application or WPF with .NET framework. MFC is another good choice. QT is the other choice which works on multiple platforms. So by learning one language, you can write code for multiple platforms and you got a variety of GUI tookits. After learning C++, learning C# would be trivial.
All the best
C# is the highest-level language of these, which means that it's the easiest one to accomplish what you want.
Windows GUIs can be surely made with C++ and even with C, but it's harder.
definitely first go to the basics: learn C.
then go to your real goal. if you want any chance of going multiplatform C# is discarded. you'd want to go with C++ and Qt, or wxWindows.
In my opinion you should starting studiying C, to have a base knowledge about aspects like memory, file accessing. C is a low level languaje, this means that you will have more control over the way you access to operating system, but to create windows application you'll have to code a lot of lines of code. For this reason, after doing few things with C, i should start with C# with Visual Studio 2008. .Net Framework comes with a huge number of classes that makes your life easier.
Hope it helps.
Kind Regards.
Josema.
C/C++ both allow low level programming. That means that everything is possible, but even simple things can be hard. If that's what you mean when you say that you want something powerful, you should probably start with C++. It at least gives you some decent GUI libraries (gtk+ with gtkmm or qt), whereas GUI programming with C is a pain.
If, on the other hand, you want to develop applications quickly (and that's what you mean by powerful), then C# is probably the way to go.
I woudl recomend C#. It's not as powerfull as the other two, but for your needs I belive C# will be least painfull. C and C++ are low-level languages, so I think they will be a lot of work for GUI and stuff.
Save the C. To those people that advise learning C, please give arguments for that. I claim that it has absolutely no benefit to learn C rather than C++. I, unlike them, have arguments to back this claim up.
In a nutshell: C is already a subset of C++ for all intents and purposes, but it's far from the most interesting subset. It only offers a very limited insight into new proramming paradigsm. C++, on the other hand, defines a few very interesting new paradigms which, furthermore, are a generalization of all that C has to offer (i.e. iterators which are a generalization of pointers).
To reiterate: if the choice is between C and C++, choose C++.
Although I agree that C is "useful" to know it is certainly no longer essential for the majority of programmers. For me these days it's main function is that it has given me an understanding of how the underlying hardware affects program performance and behavior but that's the end of it. I haven't used it in development work for the last 9 years.
In regards to getting to grips with object-oriented development I feel that both C# and C++ will give you a firm foundation but C++ is far more flexible (and harder to use correctly) while C# is more consistent and way to go if you're going to get into .NET development. I would therefore recommend learning C# and one of the "new" .NET-presentation technologies like Windows Presentation Foundation or Silverlight. Alternatively, learn Windows Forms first but it's a bit lacking in presentation.
The only case where I would recommend C is if you are going into fairly low-level stuff like device drivers, embedded controllers or similar but in most of those cases you could still use C++.
Having come up through the languages, first C on Unix, then C++ with MFC and then C# (starting with 1.0) I think that going back in time to earlier incarnations of the language is a bit like learning Latin. Oh, probably just stolen something from Paul Graham there but I would agree with it.
C is very good if you have to have a minimal object code size, very good for embedded stuff where it's one step up on the assembly language. I'm thinking of things like a Microchip PIC etc where you may only have 1K word of program space.
C++ is very good if you can have the larger object size but still need to be able to hammer the metal directly - so things like device drivers, network stacks, etc etc. The kind of glue program that sits under everything.
An OS could end up in either of these - or more likely a mix of the two depending upon the programmer, the age of the code, what it needs to interface with, the depth of the snow outside (just one more run and then I'll write that method!)
C# is really good at the higher level business focussed user layer applications. They could be web based, client based, a mix of the two - it doesn't really matter. The nice thing about the .net family is that you have a rich library, for this layer that is important, and it is being heavily developed to be richer all the time.
As computers become more powerful the cost of the developer outweighs the cost of the processor or memory.
Go with C#, ignore C and C++. By the time you are happy with C# you won't have any need to program in a lower level language for the speed increase.
Again, another vote for C# and against C. Sure C is interesting from a technical point of view and will teach you all the details, but the truth is, you don't need to know all the details to make an application. If your goal is to make something work, which it sounds like it is, it's C# hands down. C# is the highest level of the three, which means less time fighting the language, more time making stuff work.
It sounds to me like most people are recommending you learn C so that you can eventually make better C# programs. Why wait, go straight for C# and learn it. I do think C++ is an absolutely excellent language and one day you should learn it, but there's no reason why you can't make a quality C# language if you've never learnt C or C++ - many people do that every day!
It doesn't really matter what kind of language you start with but if I were you I would do:
Start with the basics in C (It will probably be hard to understand)
Move to C++
And at last C#
I'd suggest you start with C#, but quickly progress to C++ as once you have learnt how to code generally, you should return to your roots. I'm currently studying electronics because I'm going back even further. The more you know about how and why, the better you can know about how best to get where you need to go. I think a C# programmer that doesn't know any lower level language is going to write rather sub-optimal code, but a low level programmer learning C# is going to be overly cautious of all the managed stuff. So, whatever you choose, you should consider doing both in the long run.
I would go for C#.
I've done my time (lots of it) with the other 2 and find C# 'cleaner'. You also get a rich library of all kinds of functions included in .Net. I assume that you're not interested in developing for other non-Windows platforms which might have been an argument for going for C or C++. I also assume that you don't need the squeeze the last drop of performance out of the system where C might have given you a slight advantage.
To those who say you ought to learn C in order to understand how programming really works I would say that you ought to learn assembler in order to understand how C works. I did and it does help but is it really worth the pain? To be a programmer you have to switch on your brain. Think about what you are doing and understand your tools!
My vote: C#
Learn C#.
Is good to begin with the basics, but better than begin with C I would begin with the basics of C#.
This will give you a solid foundation with the fine points of C# basics and after you could move to more advanced topics.
For example you can take a look to Charles Petzold ".NET Book Zero" here.
I recommend::
First get into C. spend some time get use to it(but not too much)
Then get into C#. that's the way you can deal with GUI things more easyily.
IDE like VisualStudio can help you a lot dealing with GUI.
If you wanna be a real good programmer of C/C++/C#, then it might be not the good way but I think you are not interested in being a Guru or something like that :)
There are a lot more jobs developing windows apps in C# than C or C++. Learn C#.
C# is a good place to start. You can get it for free and you can do some fun graphics using XNA studio (also free).
I would only learn C++ if you have a specific reason to.
If you are doing Windows programming I would recommend that you do the first few chapters of one of Petzold's Programming Windows books. It will give you a basic understanding of C and of how Windows works at the bare metal level. You don't really need to learn C. Charles Petzold holds your hand and gets you up and running in a basic C Windows program.
Learn C#...if you want to develop desktop apps.
With proper set of libraries memory in standard C++ can become as easy as managed (smart pointers). Some C++ widget libraries are as easy to use as C#.NET. However it will probably perform worse than C# due to several abstraction layers. And with C++ you need to learn non-standard libraries. With .NET most of the components that you need are standard.
C is ancient and does not have STL. It demands you to be smart, but I doubt the advantages of it.
I need something pretty powerful and I would like to be able to create apps with Windows GUI's.
Well C is pretty powerful so that would would handle that criteria but something like C# and WPF would make life so ,uch easier if you're aiming to GUI apps.
Without C/C++/C# experience start with C. Edit: Ok, start directly with C# or C++ don't lose time. You cannot seriously code Windows desktop applications with C anymore, it's just to painful.
Then move to Object oriented languages to get something more powerfull.
If you wan't to stay far from windows plateform, C# is not the better option, or check out the Mono plateform.
IMO, C# is far more advanced than C and C++, you will build big application faster. WPF librarues will give you nice UI without windows style (but only on windows systems...)
Are you planning to make gui based applications for windows? Depending on what, I recommend VB. However, given your choices, I would pick C#.