Related
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 11 years ago.
I really want to learn how to program. A friend suggested I buy vs 2005 or a newer version if I'm serious about it. Is there a cheaper route? I would like to start with c#.
Visual Studio Express is available for free from MS and is perfect for getting started.
You can start with visual studio express - it is free
My path (so far):
From no programming I picked up Java for Dummies, then progressed to Head First Java.
I found I needed the Dummies book, and found that the Head First book helped me both understand some key concepts (such as inheritance and other OO fun) and gave great examples.
However the problem with an OO language can be that you need to understand a lot of OO concepts also. I jumped straight into Java, but in hindsight maybe I should have started with Python or C, get the hang of datastructures/loops etc. first THEN progress to OO.
I personally recommend using an IDE some books don't but unless you are really good at picking up typos, import statements etc. I found using just notepad only annoyed me.
If you have a support network of IRL friends that use a certain language you might consider learning those languages, as with the Web there are a lot of great tutorials but sometimes you can get information overload, and you have to wait for people to respond on forums.
C# is good for jobs where I live, so is Java and C++. After you get the hang of your first language, you can look around and learn new things based on area where you want to work in/program for eg Web, Business Apps. etc. Unless you do it just for a hobby. If not, consider what the market wants.
Hope this helps ^_^
If you're beginning programming, an express edition of Visual Studio should be far enough to discover C#.
You can find the latest Express editions here.
If you've never done any programming before then I'd recommend not jumping straight into Visual Studio and a .net language. The amount of stuff you'll have to learn just to get to the point where you can start writing code is just too great.
Start with a simple language like Python. Edit your code in notepad and run it in a command window. Write some simple programs to generate output and read input from the keyboard. Build-up slowly.
When you'be built-up a bit of knowledge, try taking the same approach with c# or vb.net. Then explore Visual Studio, and play with winforms or wpf.
Good luck!
Quick tip:
Simply buying the Visual Studio package and trying to use it might be an exercise in causing your brain to explode. At least, it was when I started.
I'd find a friend who is good at teaching to help you get started, or take a programming 101 class at a local college (community or technical colleges are perfect for this sort of thing). Or get a good tutorial from the Internet or a book. That's really the best way to get going, as they can help point you in a good direction. The Visual Studio software is very complicated if you aren't familiar with programming concepts coming in.
Also, find something cool to write, that solve problems you have:
Program that computes paintball trajectory
D&D die-roll generator, when you forget your dice
Tools to control your iPod
etc
You could also download the latest Eclipse IDE and try some Java.
Or if you want to go multi-platform, try MonoDevelop. Not as advanced as Visual Studio (yet), but certainly enough to learn to program.
Visual Studio 2005 is too old for you. Start learning on 2010 and .NET 4. And get Express version from this location http://www.microsoft.com/express/
I agree with Jay: I don't think there's any reason to purchase development tools when there are widely available free tools/languages.
Along with his java suggestion I would say checkout out Ruby!
Personally I think ruby is the easiest to start with out of the box. You don't have to worry about compilers or IDE's. Any text editor works and irb (Interactive Ruby) is a godsend for learning.
I do find that it's a bit nicer to have a good console (ie. on Linux/Unix and OSX) in order to really see the benefits of IRB, but I believe there's something similar on windows??
Best part is, it's free, and if you're looking to build webapps, Rails is probably the easiest framework you can find for building dynamic webapps.
Answer taken from here
You can download the free Visual Studio Express Edition, and also access to the MSDN library is free. And there is also Sql Server Express edition which is also free.
Add to this all the great free online resources, like stackoverflow, asp.net, codeproject, blogs etc. and you are ready to go.
If you want to start programming with C#, C++, Visual Basic.NET, F# and pals, VS Express is the way to go obviously.
If what you need, however, is focusing on basic programming concepts like conditional execution, iteration and recursion, they might be overkill. You should instead try simpler languages like C or Python.
I'm not aware of what the definitive IDE for C and Python would be, but I make do with Eclipse for the former and a simple text editor with generic completion and the support of iPython for the latter.
As others have said, Visual Studio Express edition is free, and there are newer versions than 2005. 2010 should be out soon (if it's not already available).
If you don't want to go VS Express there is also SharpDevelop which is Open Source and very nice. But I agree with what others have said in that you may want to check your starting learning language. Certain languages work well for doing certain types of programming. I always thought Java was a good language to start with because there are MANY tools that support it and lots of tutorials out there if you get stuck somewhere.
As others said: Visual Studio Express is great to start with and best of all it's completely free.
If you have previous experience with programming, c# is reasonably easy to learn. If you're completely new to programming you might find Visual Basic a lot easier. It does not matter which language you choose, as long as you're comfortable with it.
Finally, a good beginners book can help tremendously to get you started. The advantage of a book is that it takes you step by step through the learning process. This way you don't have to look all over the internet to find all kinds of unrelated samples.
Have fun!
For C++, use Dev-C++ from Bloodshed Software; super clean and easy to use.
http://www.brothersoft.com/dev-c++-download-65296.html
For Python, just use the IDE they provide. Super clean and useful.
http://www.python.org/download/
I would recommend RapidQ. It is a free semi-object-oriented BASIC programming language for Windows and Linux. IMHO, it is one of the easiest languages to learn and use (easier than VB for example). It comes with compiler, IDE and graphical GUI designer. Howevere, it is not too much different from VB.
Unfortunately RapidQ is not developed any more, but there is an active user community at Yahoo Groups. From the files section of the group, you can download the compiler/IDE and several extensions and applicatlion examples.
Objective C isn't particularly easy as a first language, but it's not that difficult either and it does have the advantage that programming for iPhone at the moment is "sexy" and "fun" and potentially commercially useful for you. Plus there are a bunch of educational videos on iTunes U (search for "Stanford" in iTunes).
XCode for iPhone development is free to download once you register at developer.apple.com
Buying VS 2005 is a terrible idea IMHO. Learn using free tools. Intellij IDEA community edition is amazing... and free.
It all depends where you want to start: Java, Python, Ruby, C, C++, C#... Just dive in and have fun with it.
I would recommend starting with these.
http://channel9.msdn.com/Series/Visual-Basic-Development-for-Absolute-Beginners
http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners
These cover the bare essentials needed to get started with programming. When I first decided to get into programming seriously (not so long ago) this would have been ideal.
I personally find videos to be a great start in learning. The use of sight and sound works great. Thereafter, when you get stuck, the MSDN Library is also a great resource, with an abundance of explanations, tutorials, and samples.
http://msdn.microsoft.com/en-us/library/ms123401.aspx
Check in regularly with MSDN http://msdn.microsoft.com/en-za/ which has all you need to get started.
Lastly, pick a project to start on. That is, think of an application you would like, or do like, and build it. Nothing tastes more like chocolate cake than deploying your first -- bug-ridden -- program. Finding an open-source application to compare yours too works well in these situations. Look here for many open-source applications:
http://codeplex.com AND
http://sourceforge.net
Happy Coding!
(HOBBY) I own a Macbook Pro and iPod Touch so developing iPhone/iPod/iPad apps seems like a logical thing to do in order to get some experience in the programming field. Besides I want to write a new application similar to the Capsuleer (Character skills monitor app for EVE Online MMO) but with more features. It's something I'd love to have on my own iPod Touch and I am sure other people will welcome a new EVE Online app for their iPhone or iPod Touch.
(CAREER) I want to learn ASP.NET (and possibly Silverlight later on) for my potential future job. I plan to work in the .NET field, so it's a good idea for me to start learning C# and ASP.NET ASAP.
Is it a good idea to learn completely unrelated technologies at the same time? Or would it be better to learn one thing at a time? Objective-C first, and ASP.NET second. Or vice versa.
Thanks,
Sahat
UPDATE 1: I am reading both ASP.NET 4.0 and Objective-C 2.0 books right now and let me tell it's going great so far! Diversity is probably what makes it so fun and less dry. While I am on the bus to Manhattan in the morning I learn about ASP.NET and Visual Web Developer 2010. While I am in school I am programming a robot in C++ for the Summer Robotics Workshop. And when I am heading back home I am learning Objective-C! I was really scared at first to learn 2 completely unrelated programming languages, but as it turns out it's not too bad!
It depends on your comfort level with languages in general. If you have decent experience, then moving from one language to another should eventually get to be very fluid. As an example, I'm a .NET developer during the day, but usually mess around with Objective-C and Ruby at night. I think the only downside is being frustrated with each language (for example, "why can't c# do this thing that ruby can do?") But in general, it is pretty easy to isolate the two, especially if you're good at compartmentalizing things in general.
Personally, I'd say go for it. Immersion in a single language can get you far, but I think seeing multiple languages and platforms regularly makes you a better programmer in general. It will show you different approaches to the same problem, and will teach you how to decide what tools to use for a particular problem. Plus, it beefs up the resume. Don't discount the power of Objective-C being on that piece of paper, because there are good careers to be had there. And as the Mac platform becomes more and more popular, many companies will begin to port .NET desktop apps to OSX, and knowing both could be an invaluable asset.
Since you are keen on developing for iphone. Focus on objective C.
Think of it as C with a decent Object Oriented extension.
You will learn C and object oriented. And it is apple friendly.
Career wise it will be pretty timely resume stuffer to have an Iphone app in your
portfolio.
On the other hand I recommend you learn how to design programs first.
The time you spend will be repayed in your first project.
You will be leveraging it from then on. It is really the best route.
To learn that.. go here: http://www.htdp.org
They have a great free downloadable dev environment and tons of material online.
They are the best thing since sliced bread.
You can work through their stuff really fast and dont waste time caught up
in syntax irrelevance.
That's pretty much my coding life in a nutshell, so it's quite possible and practical. I learned .NET on the job and taught myself Objective-C.
You didn't mention if you have any prior programming experience, and that changes the advice drastically. If you have no understanding of object-oriented development or programming in general, I would recommend staying the hell away from O-C for awhile. I wasted many high school hours trying to learn Cocoa working off of one semester of C++ programming. When I got into college and objects were the norm, Cocoa made much more sense.
Once you have a little understanding of object-oriented programming, you could even teach yourself the basics of Cocoa...without writing in Cocoa. Cocoa apps are written in a structure called Model-View-Controller (MVC), and Visual Studio has a very popular and well-supported MVC template for writing C# applications.
Good luck!
Objective-C on iPhone and C# on ASP.NET are very different, but there are lots of similarities too:
Both options have comprehensive Integrated Development Environments with debugger and other tools.
Both support modern program design paradigms like Model-View-Controller.
Both have online documentation and lots of sample code.
Both systems have large numbers of proponents, especially on StackOverflow :-)
Both languages have C-like syntax - curly braces, etc.
The biggest difference, in my opinion, is the output. iPhone OS will give you a binary which requires proper packaging to be able to be used by another person. Outside of ad-hoc deployment, actually getting your app to other people has some hoops to jump through and some $$$ to pay.
ASP.NET can be used by anyone you give access to - hosted on your server, etc.
To be able to compare and contrast, its often possible to write the same program in two different systems to be able to see how they differ. Due to the form factor and aforementioned iPhone deployment, this is harder.
As a learning exercise, I would go ahead and do both in parallel, sure, but understand if you want to go all the way to publishing your code, each option is very different.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Im a pretty experienced programmer in PHP and mainly web languages but today i have decided i want to start to learn a new language!
Im only 21 and I feel as I will never make it in the programming industry without a great set of languages under my belt, So i decided to have a look at C#.
The reason I have chosen C# is because some C programmers have told me that C# is the best language to learn for desktop applications.
I think i need to get started with the Syntax / Structure of C#, What Development Environment to use, and other things that i might face along my new journey.
I hope somebody can guide me
Thanks.
For IDE, you can use Visual Studio Express. And here's a nice set of tutorials.
Also do get your basic concepts straight about .NET framework and CLR.
Once you get the hang of it, Try out LINQ. It is (arguably)the most wonderful feature of the framework. Find some good LINQ tutorials here and here
Although you explicitly mentioned Desktop applications, .NET FW is equally suitable for Web applications 4GuysfromRolla is my favorite ASP.NET resource.
For Dektop applications you might want to start with WinForms, but WPF is the technology of the future. So you are better off learning it if you want to be developing Desktop applications for windows.
Happy Learning!
Stuff you'll need for the beginning:
Visual Studio 2010 Express edition
Few evenings with coffee and Beginner Developer Learning Center
A nice book like this one (it might be a giant one, but I'm in love with it)
Some more coffee
A lot of patience with stuff that isn't in PHP (LINQ, delegates, generic types etc)
Some nice idea to start actually developing and trying stuff out
The best way to learn is to have a problem to solve, and specifically I mean to do something that you DON'T know how to do, rather than something for which you already have the tools. I'd browse around on the net for some toy problems and try to build an app for it.
Eg. I only started on the way down OOP once I decided I needed a poker probability calculator. So basically I had to read a bunch of stuff about VB 6 as I went along. Classes, properties, methods, syntax... the web is great for that kind of thing.
I suppose what I mean is Just Do IT... (see what I did there? :) You'll screw things up, but learn loads more than any book can teach you.
If you're using Visual Studio for Learning it you can use MSDN that perfect for early learning is enough.
I highly recommend Illustrated C# 2008 by Daniel Solis. That's the book I used to learn how the C# language worked (Don't be fooled by "Illustrated" in the title: it's not so much a "beginner's" book as much as it uses good illustrations to teach the language).
You might consider following up with a book dedicated to Silverlight, Windows Presentation Foundation, or ASP.NET if you want to be able to apply what you learn in C# to an appropriate API. I would recommend any book by Matthew MacDonald for the latter.
Learning the basics Pascal, Java, C# and even C is more or less the same...
Start with the studying material of any academic "Introduction to Computer Science" course,
try solving the assignments in a few different languages (to learn C# at a C-like level),
then move on the material from any academic "Object Oriented Programming" course to learn the rest of the basics.
After that is only a matter of experience and searching the MSDN help.
Since you're already an experienced programmer learning C# is more a less an exercise in learning the .NET Framework. The syntax should be easy enough for you to nail down pretty quickly, just by looking for a few tutorials. The harder part will be learning the vast API available to you via the Framework.
I suggest finding a good book on C# (I've had good experience with Microsoft Press and I've heard good things about Wrox and O'Reilly). Make sure it discusses classes, polymorphism (inheritance and interfaces), event based programming, LINQ and reflection.
I believe you'll also want to look at any books dealing specifically with ADO.NET and WPF. The great thing about .NET is once you learn the .NET Framework API you can pretty much move between languages as needed.
I wanted to learn to program and looked at both Java and C#. I decided to go with C# because it was so easy to just open a form and plop some buttons and text boxes on it. With just one download, C# Express got me going.
From what I saw with Java that couldn’t be done. At least not without downloading and configuring other software. All of which I found no easy instructions for. But I really wanted to learn Java.
I really don’t want to learn how to create UIs AND a new language. I’d rather just to concentrate on the code itself. Is there an easy way (like C# basically) to create Java apps?
Are you talking about a GUI builder?
There are many GUI builders out there. Some IDEs like Netbeans come with nice GUI builders for Java.
There are options in the Java community for 'one-stop downloads' like you mention. They are out there, they're just not as public as Visual Studio is. EasyEclipse is one of my favorites.
I've done a fair bit of work (> 4 years) on both platforms and the biggest difference I have found is not so much with the languages per se, but with the whole development environment. Specifically:
In .Net (be it ASP.Net, C# or VB.Net) the examples you find on MSDN or elsewhere tend to just work without a whole lot of tweaking, and the documentation is more reliable, whereas Java examples - especially the open source ones - often don't work out of the box and the documentation (yes, Apache Slide and Shindig - I'm looking at YOU!) is sometimes non-existent.
Having said that, the sheer amount of choice for plugins, libraries and the like for the Java platform is enormous, which is unsurprising considering its (largely) non-proprietary nature.
It seems to me the best and easier way to get what you want is to use Netbeans (JDK 6u14 with NetBeans IDE 6.5.1 Bundle).
It has both the JDK and the IDE in one download. And it has a easy and very good GUI builder.
Java is a very good platform and as you said it is easier to create cross platform applications, however, don't except this from the Desktop UI which, although still cross platform, not always gets right on all platforms with out modification.
You would have to add some code specific for each target desktop, but definitely that's a lot easier than write three different application ( One in Visual C#, other in GTK, and other in Cocoa )
I been learning to program in C# for a few months, but recently I signed up for a course which required Java. So I started playing around with java, first tried Netbeans then Eclipse.
I'm kinda a computer programming noobie (background mainly in web design) so take my perspective as a student. After messing around with Java for a bit i still prefer C#. While both are excellent the factors that tipped C# in my case are as follows
Easier documentation and a large variety of easy to view Video Tutorials, yes I know netbeans have a very large collection of video tutorials as well, they are encoded at such a terrible resolution and bitrate that they are largely unwatchable
Slightly easier to learn, maybe it's cause of the IDE or the syntax, but I found C# easier to pick up.
More functionality exposed right after using the IDE, you will find more controls in visual studio than compared to Netbeans. Eclipse was quite confusing for a noobie like me wading through it's massive plugins.
I think the only thing java has going for it, is that it's supported on more platforms. Though Mono is making up for the linux and Apple side so i guess it's not that bad. Either way they are both extremely productive environments, just in my humble noobie opninion C# is just slightly more intuitive to pick up.
The ability to learn to program in one language or another should most certainly not be based upon how to drag and drop GUI controls, especially since that measure is irrelevant to the language itself.
Side note: Java and C# are so similar that you'll pretty much be learning both as you go regardless.
I'd have to agree with dxmio, I switch back and forth between c# and java quite often. The two languages are quite similar.
The best way of learning programming .. is to write code!
If you know your way around Java, It's a mater of syntax to learn C#.
Programming is just as much a way of thinking in code, as knowing a language.
Personally, I didn't start with GUI. I started with BlueJ, a free "learning" compiler, for Java code.
No programmer in the world knows any language 100%. Their all sitting in their office, and playing with stackoverflow and google all day. Remember, Google is your best friend! (May be a bit of caffe too !)
Reminder: The best way to learn to write code, is to write code! If it's C, C++, C#, Java, PHP, Python or whatever you prefer, it's a matter of framework and syntax.
If you have Java in your browser, all you need is the latest Eclipse bundle.
I would suggest the Java EE edition for your platform from http://www.eclipse.org/downloads/
It appears that there are video tutorials starting from scratch at http://eclipsetutorial.sourceforge.net/totalbeginner.html
Using Netbeans, you can create Java based Swing GUIs pretty easily. Netbeans comes with a pretty nice GUI builder.
If you learn how to program in Java, I don't think it would really be that much of a stretch to create Java Swing applications from scratch. It's just a matter of learning the Swing libraries.
Not being from a .NET background, I can't comment on learning C# GUIs, but from my experience Swing was very easy to learn and it helps A LOT to understand the code underlying what the GUI builder in Netbeans generates.
I decided to go with C# because it was so easy to just open a form and plop some buttons and text boxes on it.
You can do this using builders in either language without writing any code.
With just one download, C# Express got me going.
Netbeans is the same deal for Java.
From what I saw with Java that couldn’t be done. At least not with out downloading and configuring other software.
True, you cannot develop Java with C# Express and you cannot develop in c~ using Netbeans. You do need to install two pieces of software.
All of which I found no easy instructions for.
I suggest you try http://www.google.co.uk/search?q=netbeans+gui+builder+tutorials 55,100 hits or http://www.google.co.uk/search?q=java+gui+tutorials 1,340,000 hits
But I really wanted to learn Java.
It doesn't appear you want to actually write any code or install more than one program at a time. You will find that learning to program in a language will be asking more from you than this.
Was I missing something?
Quite a bit I imagine.
I really don’t want to have to learn how to create UI’s AND a new language.
You can use a GUI builder to layout your windows, but if you want your program to do something useful, you will have to do some programing in a language.
I’d rather just want to concentrate on the code itself.
That appears to contradict everything you have just said. You can't concentrate on the code without learning the language.
Is there an easy way (like C# basically) to create Java apps?
To write apps that do something useful you are going to have to learn how to program and at least one language. I suggest you also learn how to debug and profile your program.
i found this for designing java winform application for you .
please check out
www.formdev.com
JFormDesigner™ is a professional GUI designer for Java™ Swing user interfaces. Its outstanding support for JGoodies FormLayout, GroupLayout (Free Design), TableLayout and GridBagLayout makes it easy to create professional looking forms.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am not that good at programming. I finished my masters degree in electronics. I want to learn C#, the .NET Framework, and SQL. How much time do you think it would take (if I have 5 hours a day to devote to it)? Also, what order do I learn them in? I have Visual Web Developer 2008, is that enough to begin?
Copied from a new question by the same user:
I should have specified that I wish to make a career out .NET Development. I'd like to give myself 2 months to get the 'basics' down. As a developer, what is expected out of you in IT companies? What skillset do they require and what are the responsibilities as a junior or mid-level developer? I don't have any industry experience, will I be able to get a feel of the job duties while at home?
That's like asking how long it would take to learn French:
1 day to learn what it is
1 week to learn it to an infant/elementary level
1 year to be considered a beginner by professionals
Several years to be considered an experienced professional
Plus there's "deep" knowledge of those subjects which a mere mortal such as you or I will never learn
Then again, plenty of people (most normal people, non-programmers) never learn those subjects, so if you're like "most" people then the answer would be "it would take forever" or "it will never happen".
Dive right it, make it a hobby, and have fun :)
Coming from an electronics background myself I can tell you that you should pick it up pretty quickly. And having an electronics background will give you a deeper understanding of the underlying hardware.
IMHO the root of information technology is electronics.
For example..
Think of objects as components.
The .NET framework is essentially drawers full of standard components.
For example you know what a 7400 (NAND gate) is capable of doing. You have a data sheet showing the pin outs and sample configurations. You don't typically care about the circuitry inside. Software objects are the same way. We have inputs and we have methods that do something to the inputs to produce predictable outputs. As developers we typically don't care how the object was written... just that it does what it says it will do.
You also know that you can build additional logic circuits by using two or more NAND gates. This of this as instantiation.
You also know that you can take a NAND gate and place it inside a circuit where you can modify the input signals coming in so the outputs have different behaviors. This is a crude example but you can think of this as inheritance.
I have also learned it helps to have a project to work on. It could be a hobbyist project or a work project. Start small, get something very basic working, and work up from there.
To answer your specific question on "what should I learn first".
1) Take your project you have in mind and break it into steps. For example... get a number from the user, add one to the number, display the result. Think of this as your design.
2) Learn basic C#. Write a simple console application that does something. Learn what an if statement is (this is all boolean logic so it should be somewhat familiar), learn about loops, learn about mathematical operations, learn about functions (subroutines). Play with simple file i/o (reading and writing text files). The basic C# can be thought of as your wiring and discrete components (resistors, caps, transistors, etc) to your chips (object).
3) Learn how to instantiate and use objects from the framework. You have already been doing this but now it's time to delve in further. For example... play with System.Console some more... try making the speaker beep. Also start looking for objects that you may want to use for database work.
4) Learn basic SQL. Lots of help and examples online. Pick a database you want to work with. I personally think MS Access is a great beginners database. I would not use it for multi-user or cross platform desktop applications... but it is a great single user database for Windows users... and it is a great way to learn the basics of SQL. There are other simple free databases available (Open Office has one for example) if you don't want to shell out $ for Access.
5) Expand your app to do something with a database.
Just do it! Don't sweat the details.
Well, it will take you forever. There is so much to learn about programming that 10 years are not enough.
http://norvig.com/21-days.html
Don't get me wrong, you will learn the basics quickly enough, but to become good at it will take much longer.
You should focus on an area and try to make some examples, if you choose web development, start with an hello world web page, then add some code to it. Learn about postbacks, viewstate and Sessions. Try to master ifs, cycles and functions, you really have a lot to cover, it's not easy to say "this is the best way to learn".
I guess in the end you will learn on a need to do basis.
The best thing about C# is that it is very catchy. Easy to pick up, and you'll also have fun doing it.
But .Net framework is a very big library full of wonderful things to discover, and yet again due to the nature of .Net you'll also have fun learning it. It's a coherent, object oriented, well documented library, and C# makes it so simple to work with it that you can simply discover your way through it while coding.
The vast majority of articles, books or resources about .Net and C# simply concentrate on explaining functionality and the framework and far less about how to avoid quirks, workarounds or exceptional cases, like it happens with other languages I don't want to name (*cough C++*) so in the end the experience of learning C# and .Net is very enjoyable from start to finish, and the things you can accomplish using .Net also makes it very rewarding.
You picked a good language to start with, in my opinion, and finally to answer your question, it will take you about:
2 to 3 months to learn the basics
1 to 2 years to become a versed developer
5 years or more to become a expert or, depending on your dedication, a "guru".
But then again, beating the numbers and breaking the limits lies inside human nature. Can you do it faster than this? ;-)
How long is a piece of string? I think this is subjective. I know programmers that have learned an extraordinary amount in a very short time based on the experience that they've exposed themselves to.
Basically, get your hands dirty and you're bound to learn more.
It really depends on what you mean by "learn". You could probably spend a week and get a couple of pages up on the web that had some minimal level of interactivity to save information entered by the user in some database, and then have some other pages for querying and displaying the information. You could then spend the next 10 years of your life learning all the intricacies of the .Net framework, SQL, and mastering using the IDE.
The period of which you are capable of learning really depends on your ability to grasp the logic behind programming while where to learn from depends on your learning style.
If you are a learn-by-a-book type of guy, just jump on Amazon.com and perform a quick search, pick up the book with the best reviews or wait for someone here to recommend a book (I'm not a programming by book guy)
If you prefer screencasts (video feeds demonstrating what to do) or tutorials, then go straight to the source: http://www.asp.net/learn/. There are tons of videos and tutorials explaining everything you need to get started.
Visual Web Developer 2008 Express should be all you need to get started. Basically, the express editions are Visual Studio chopped down to a precise set of functionality to accomplish one thing. They don't have some of the bells and whistles needed for large scale development, but everything you should need.
Can't tell how long it would take, it really depends on your existing knowlege. I managed to learn the C#/.NET 2.0 core basics in about 2 months.
My suggestion to you: Try to learn towards exams, they make sure your learning covers all important parts and also guide you through this new technology. See Microsoft Learning.
If you have any programming experience, you can probably learn the C# syntax in a few hours, and be comfortable with it within a week or so. However, you will not be writing complex structures unless you write a lot of code with it. It's really the same as learning any language: you can learn all the words and grammer fairly quickly, but it takes a while to be fluent.
EDIT
A book you may want to pick up for learning C# is C# in a Nutshell (3.0) which I found to be very useful, and has been recommended by several people here.
If you want to learn, REALLY want to learn, then time is not of consequence. Just move forward everyday. Let your passion for this stuff drive you forward. And one day you'll see that you are good at C#/.NET.
You'll pick up c# fairly quickly (the language syntax is not that complicated). It will take you a long time to really learn the .NET framework, but you'll pick up the heavily used parts of the framework fairly quickly, and you should start seeing patterns in the framework.
My advice to you: don't just learn from a book or website. They will teach you the language and framework, but they will not teach you how to program anything useful.
Writing little code snippets will teach you how to do a very specific tasks, but they do not teach you how to write applications. My suggestion is that you think of an app that might be fun to work on (and doable... e.g. don't think that you're going to write an operating system or crysis or something in a month or two). Personally, when I was learning, wrote my own full featured IRC app, complete with rich text, personal messaging, etc.
The answer in my view is related to whether you have a tangible problem to solve or if you just want to learn for example to be prepared for a possible new job. If you have a problem then you are in better shape. You can start by looking around and seeing how other people went about solving that problem. Languages in general you should be able to pick up fairly quickly (after all you hold an MS in EE, no small feat IMO).
What you need to be on the lookout for is good programming practices. You'll probably see yourself asking "why is this method so small", "why is this method empty and what the heck is this abstract word doing here". That will give you perspective beyond syntax towards good writing.
When I switched careers out of Finance, I took 9 months off to study C++ full-time out of a book by Ivor Horton. I had a lot of support from my best friend, who is a guru, and I had been programming as a hobby since high school (I was 36 at the time).
It's not just the syntax that's an issue. The idea of things like pointers, passing by reference, multi-tiered architectures, struct's vs classes, etc., these all take time to understand and learn to use. And you're adding to that the .Net framework, which is huge and constantly evolving, and SQL, which is a totally different skill set than C#. You also haven't mentioned various subsets of the framework that are becoming more widely used, like WPF, WCF, WF, etc.
You're an academic so you can definitely do it, but it's going to take serious effort for a long time, and you definitely will need some projects to work on and learn from. Good luck to you.
According to Malcolm Gladwell, it will take you 10,000 hours to get really good. So get cracking.
Simple answer: a lot longer than two months. Learning to program competently will take longer than that, no matter what. It took me years to learn to be a competent object-oriented programmer, and I'm good at this stuff.
More detailed answers: it doesn't really matter whether you learn C# or SQL first, as they're very different. I'd probably suggest SQL, as it's easier to learn and more independently useful.
You will have a hard time getting used to the on-the-job realities at home, much as if you were studying plumbing or quantitative finance.
You're going to have a hard time putting all the information together without one or more projects you try to do. You're going to need to have other people to tell you when you're being stupid, when you're being overclever and will pay for it later, and when you're actually getting it.
Try to find an open source project you find vaguely interesting. Study their code. Figure out why they do what they do. Look at the bug list, and try to find something as trivial as possible to fix. Work from there. Learning to contribute is going to teach you things that are useful in the work world, and it will give you something to point at. It will be far easier to get your first job if you have some experience to point to.
All "relativity" aside, not fast. Based on the fact that you said you never programmed before...to become a basic programmer, a few years.
And to become a good to outstanding (using design patterns and industry recognized standards that relate to common standards as defined by ISO/IEC 9126 Standard such as testability, maintainability, etc.) programmer, it takes years of experience and coding often.. you do not become "Sr." or an "Architect" overnight and the same thing is true for a mid-level developer who doesn't code slop.
It's always a process where you improve. So learning is relative. But to learn the basics, seems simple until you start to design classes and interfaces. And even Leads stumble on the basics..doing things wrong. Everyone does. There is so much to be aware of.
If you're just going to be adding features (using classes your Lead or Architect has stubbed out for the team) and not really adding new classes, etc. it's easier....but you should take care in coding using standards and you still have to know complex areas of OOP. But that's not really OOP. When you start to creating classes, interfaces and knowing about inheritance, heap, references, etc. yada yada...and REALLY understanding it takes time no matter how smart you are or think you may be.
So, for a new programmer. Not easy. Be prepared to code a lot. And if you are not, find a job where you are. It's all about coding as much possible so you can get better.
Read these books FIRST. Do not dive into any others out there because they are not geared toward teaching you the language in a way you can get up to speed fast:
http://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678/ref=pd_bbs_sr_4?ie=UTF8&s=books&qid=1231280335&sr=8-4
http://www.amazon.com/Head-First-SQL-Brain-Learners/dp/0596526849/ref=pd_bbs_sr_7?ie=UTF8&s=books&qid=1231280335&sr=8-7
http://www.amazon.com/Head-First-C-Brain-Friendly-Guides/dp/0596514824/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1231280393&sr=8-1
http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124/ref=pd_bbs_sr_3?ie=UTF8&s=books&qid=1231280393&sr=8-3
they will get you the fasted jump start into understanding, better than any books out there.
Also for these lame type of responses, ignore them:
"Then again, plenty of people (most normal people, non-programmers) never learn those subjects, so if you're like "most" people then the answer would be "it would take forever" or "it will never happen"."
Those come from developers (typically leads) who have some Ego trip that DON'T want you to learn. Everyone learns differently and at different paces and eventually you will become "fast". I get very tired of hearing Sr. developers say statements like this when their sh** also stinks many times no matter how good they are. Instead they should be helping the team to succeed and learn as long as their team is working hard to keep abreast and doing what they can on their own as well (not leachers).
Make sure you try to get a Jr. Level Developer position first...
2-3 months to learn the basics...no way. Unless you're gonna code spaghetti sure. Same goes for the 1-2 years. Spaghetti it is then..
Build on what you already know and have a look at lot of job adverts. E.g I have seen jobs asking for WinForms/WPF AND electronics for the writing of a UI to control a custom bit of hardware.
You may find the “robotics” .net toolkit interesting.
.Net is now too big for anyone to learn both WEB and Desktop so you have to decide the way you are going to go. Web has lots more jobs, but there are very few people with good desktop stills.