I am getting ready to learn asp.net and I am not good when it comes to programming but I was told to choose either VB.NET or C#.
I just need the comfirmation that VB.NET is much easier to learn than C#. Thx.
Do you guys honestly think that VB.NET is easier to learn than C#?
I also code in both VB.NET and C#, and I must admit that I started in VB.NET because I too had heard that it was much easier to learn than C#. After about a year of going back %26amp; forth between one and the other (the last code I wrote was in VB.NET), I'd honestly say they're about equally challenging to master.
If I had to do it all over again, I think I'd still start with VB.NET, for a few (not necessarily universal) reasons:
- I still find the VB.NET "grammar" much easier to understand - the way that procedures are written, to me they read more like English. In C#, I had the hardest time just getting past weird things like "public void Jump()" - wtf does "void" mean to a non-programmer?
- 95-99% of the VB.NET code you write can be immediately translated to C# and vice-versa - sites like http://labs.developerfusion.co.uk/conver... make it dead-easy to convert most .NET code from one to the other.
- There seem to be more "learn by doing" books out there targeting VB.NET than there are for C#. Somehow the perception that VB.NET is easier seems to fulfil its own prophecy by allowing the market to support books like "Microsoft Visual Basic 2005 Express Edition Programming for the Absolute Beginner", "Visual Basic 2005 Express: Now Playing", "Microsoft Visual Basic 2005 Express Edition: Build a Program Now!" (if you can find it cheap), "Microsoft Visual Basic 2005 Step by Step" or "Visual Basic 2005 Cookbook: Solutions for VB 2005 Programmers". Most of the C# books seem to focus on the old comp sci approach of learning classes, variables, conditionals and all the other boring crap before you actually get to try something useful and relevant (which is the difference for me between "couldn't get through chapter 1" and "actually trying to write something on my own").
[Full Disclosure: the first time I actually felt like I was going to be able to learn how to program was after going through a few chapters of "Build a Program Now!". It's pretty lightweight stuff, but I think that was the key to making VB.NET accessible enough for someone like me who'd been daunted by programming for years.]
My Advice: go to your public library, get a few of these books out and give 'em a whirl. It won't cost you a dime, you'll learn something regardless, and if you like one of 'em enough, *then* consider buying it and bringing it home. Try a couple of the C# books you find on the nearby shelves as well - who knows, it might work for you just as well. Either way, if you expect you'll ever be bridging the divide between the two, I'd highly recommend a copy of "C# %26amp; VB.NET Conversion Pocket Reference" - after writing some code in each, this book made both languages make a LOT more sense.
Reply:It really depends on your background. If you have used C or C++ before then C# would be easier. I think VB.NET is Easier because its all visual and you can drag and drop Controls on the screen. But C#.NET and VB.NET are both the same in the basic code. overall they cover the same topic. Go online and search for VB.Net tutorials and check it out.
Reply:I personally think C# is much easier to learn. VB.Net is far too verbose for my taste. C# syntax has more crossover with C, C++, and Java.
Reply:The VB.NET IDE has background compilation, so as you type if you get a variable name wrong, or if you get a data type wrong, it tells you with a red underline. You don't currently get that feature with c#.
In c# you have to buy either JetBrains Resharper, or omnicore's JustCode to get this feature. For at least $150 fro the cheapest option.
In c# you have to explicitly call .ToString() and do more explicit casting than in C#.
I code in both languages, they're only a little bit different from each other code wise. I think VB is easier to learn, especially when it comes to initializing arrays, square brackets vs parenthesis. The ide can give you a better crutch for VB (for now, this may change when Orcas comes out in a a few months).
Using commercial plugins changes the game IMO... I think its easier to code in C# with the Jetbrains Resharper product bolted on to visual studio. But its an extra $250...
Either way its not going to be a big deal. You'll eventually learn both of them if you work in the industry long.
Edit: One additional consideration. Legacy code and teammates. A lot of c++ developers migrated their way to c#. VB.net often has an emphasis on verbosity %26amp; clearness of reading. C++ developers often tried to do as much as possible in one line of code, which was a common practice before the concept of self-documenting code came along. If you're working with other people on a team, C# developers are way more likeley to throw you a code curveball using arcane operators than in vb.net A big example of this is decision structures. In c# you can write just about anything into true-false evaluation using shortcuts. In vb.net, you need the If-then-else or some other verbal decision structure. Take for example this line of code from my current project. (hopefully it will not get cropped)
cgMedications.Visible = ((CurrentFacilitySettings.HBOMedicationA... == 1) || (CurrentFacilitySettings.Medications == 1));
In vb, this would be
If facilitysetting.hbomedicationadministrat... = 1 or facilitysetting.medications = 1 then
cgMedications.Visible = false
end if
Reply:C++ is way to easy, besides it will help you understand almost any code since a lot of them are written like it... I would learn C if i were you
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment