Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which is better?
#1
Which one is better to use? C# or Visual Basic? I know a bit about Visual Basic, did a couple of projects in it and it seems fairly easy. I also know how to code in PAWN, but I am wondering, is it worth to learn C#? What is the difference? Also, I noticed that there are barely any tutorials for C# here :/
Reply
#2
I'm not expert (AceInfinity will give you an in-depth answer I'm sure), but what I do know is:
They're both .NET Framework so there aren't any major differences, and I'm sure as far as performance goes, there's pretty much no difference at all.
C# has a tidier syntax than VB.
Because of C#'s tidier syntax, you'll pick up other languages a lot easier.


Reply
#3
(01-18-2012, 06:03 PM)Gerira Gaijin Wrote: Which one is better to use? C# or Visual Basic? I know a bit about Visual Basic, did a couple of projects in it and it seems fairly easy. I also know how to code in PAWN, but I am wondering, is it worth to learn C#? What is the difference? Also, I noticed that there are barely any tutorials for C# here :/

I'll start with the benefits of each based on what I know from personal experience, and background information I have on both, and you can decide on your own...

Visual Basic - Programming language:
  • Visual Basic is a lot easier to learn than C#, because it all revolves around keywords, and less braces to take care of, however it's also more popular so you can advance through VB.NET a lot faster than C#, even just around the forum you've noticed that I'm sure. VB.NET also gives you the most for it's intellisense, so if you forget something, chances are you'll get a lot more results as you type in comparison to C#, which doesn't seem to have as great of a database for intellisense recognition from my experience with it.

C# - Programming language:
  • C# is a little bit harder to learn than VB.NET for a few reasons; it's not as popular (because it's a bit more difficult), and it's case sensitive. However, don't let that fool you from a few advantages. If you learn C# there's lots more freelance jobs for it than VB.NET, I'm not sure why, but that's just the way it is. Possibly because it just "looks" like a much more advanced language than VB.NET, however it's also got a bit more functionality than VB.NET in terms of what you can do. It's a tad bit more developed than VB.NET, and if you start with a language like C# to start your programming venture, advanced languages like C, and C++, and even Java for that matter, will become a lot easier to understand if you ever want to progress to a more difficult language like that, as the syntax is pretty much very comparative, especially for C, and C++, but they all have the same syntax/structure pretty identical to C#. If you try to move from a language like VB.NET though to one of those mentioned languages (C, C++, Java, for example) then you're likely going to have a harder time understanding it because VB.NET will place in your mind, some very bad habits for those languages. For example, being case sensitive, requiring more than one file (to be proper with headers and source files), and also the structure of how functions work, and the order in which things are read to the compiler.

If you're just starting out though then maybe learn the basics from a language like VB.NET, and as long as you make sure you're in good habits you should be fine, else, you're already familiar with basic syntax and you have a grasp on how functions work, and different types, then you may want to just move over to C# and start learning there, which is what I would recommend, because I can guarantee, that if you're a serious programmer, at some point down the road you're not going to stay with C#, you're going to advance to C, Java, or C++ most likely, as they are some pretty recognized languages for programming out in the world today.

I do know for a fact that there are more advantages in C# in the back-end though that not everyone would know about from a first glance. But why I recommend it is also because it forces you to practice better programming habits, whether you decide to or not because they are required. Other than that, C# and VB.NET are almost identical, with syntax, except for the braces, and the case sensitive factor. And another thing that beginning out on C# that you might notice over from VB.NET is that instead of using & to concat strings, it's +, but that's good because it's similar to C++ in the way that you can't use & to concat strings. There's various other methods to do so, such as streams, etc...
Reply
#4
(01-18-2012, 08:08 PM)AceInfinity Wrote: I'll start with the benefits of each based on what I know from personal experience, and background information I have on both, and you can decide on your own...

Visual Basic - Programming language:
  • Visual Basic is a lot easier to learn than C#, because it all revolves around keywords, and less braces to take care of, however it's also more popular so you can advance through VB.NET a lot faster than C#, even just around the forum you've noticed that I'm sure. VB.NET also gives you the most for it's intellisense, so if you forget something, chances are you'll get a lot more results as you type in comparison to C#, which doesn't seem to have as great of a database for intellisense recognition from my experience with it.

C# - Programming language:
  • C# is a little bit harder to learn than VB.NET for a few reasons; it's not as popular (because it's a bit more difficult), and it's case sensitive. However, don't let that fool you from a few advantages. If you learn C# there's lots more freelance jobs for it than VB.NET, I'm not sure why, but that's just the way it is. Possibly because it just "looks" like a much more advanced language than VB.NET, however it's also got a bit more functionality than VB.NET in terms of what you can do. It's a tad bit more developed than VB.NET, and if you start with a language like C# to start your programming venture, advanced languages like C, and C++, and even Java for that matter, will become a lot easier to understand if you ever want to progress to a more difficult language like that, as the syntax is pretty much very comparative, especially for C, and C++, but they all have the same syntax/structure pretty identical to C#. If you try to move from a language like VB.NET though to one of those mentioned languages (C, C++, Java, for example) then you're likely going to have a harder time understanding it because VB.NET will place in your mind, some very bad habits for those languages. For example, being case sensitive, requiring more than one file (to be proper with headers and source files), and also the structure of how functions work, and the order in which things are read to the compiler.

If you're just starting out though then maybe learn the basics from a language like VB.NET, and as long as you make sure you're in good habits you should be fine, else, you're already familiar with basic syntax and you have a grasp on how functions work, and different types, then you may want to just move over to C# and start learning there, which is what I would recommend, because I can guarantee, that if you're a serious programmer, at some point down the road you're not going to stay with C#, you're going to advance to C, Java, or C++ most likely, as they are some pretty recognized languages for programming out in the world today.

I do know for a fact that there are more advantages in C# in the back-end though that not everyone would know about from a first glance. But why I recommend it is also because it forces you to practice better programming habits, whether you decide to or not because they are required. Other than that, C# and VB.NET are almost identical, with syntax, except for the braces, and the case sensitive factor. And another thing that beginning out on C# that you might notice over from VB.NET is that instead of using & to concat strings, it's +, but that's good because it's similar to C++ in the way that you can't use & to concat strings. There's various other methods to do so, such as streams, etc...

That was a truly excellent read, and well put together non biased opinion.

It has even made me consider starting C# sooner then i planed purely because it makes sense that VB will give you bad habits when converting over the the next language.

Thanks Ace ^^
Reply
#5
After programming in VB for a while, moving back to C++ I noticed was a few minutes of struggle. For some of these reasons, so there may be more benefits that could have been added to BOTH VB and C#, but this is just from my experience, and my personal research on each.

So my opinion stands as this:

-If you're a complete beginner, I would probably have to suggest going with VB first to get used to functions, how to call them, how to use operators, etc...

-If you're an intermediate programmer, but you have a good grasp on the basics for ANY language; operators, types, functions, logical statements, etc... Then I would have to recommend going with C#.

It's all about getting into the best habits as soon as possible, but if you're new to programming, a language like C# over VB.net can be overwhelming and very discouraging to continue your programming adventure. Unless you're fortunate and determined enough to stick with it, and you actually get some of what you learn out there just naturally.

I actually started off in batch scripting, which is how I got the basic grasp for how to use things like loops, and how to define between a number value and a string of a number value, etc... If you get a good handle on those fundamentals, you can learn any programming language you want I believe. As long as the material you have is somewhat decent, you're determined enough to learn, and you can take the time to practice lots.
Reply
#6
So C# is better than VB? As I understood, knowing C# is better in a long-term run, career-vise? I looked at C++ and it looks to messy for me, and everyone knows VB so I guess I'll learn C#. Doesn't seems hard, I just need to learn some basics that differ from VB.

Anyone willing to explain to me all the stuff you get when you make a new project in C#.Net? Like the code, what's public and what's private and that kind of basics (not meaning what are variables and such, I know that, I'm an intermediate so to say in PAWN, and an advanced beginner in VB), what each file in the Solution is for and such? I would greatly appreciate it, and it would allow me to skip some noobish tutorials and it would save me some time.
Reply
#7
If you take both languages in whole, ignoring difficulty to learn, and bad habits, and the syntax to an extent, they are virtually the same. It is just a matter of preference, once you have one completely down, you can basically learn the other language in a day if you want. There are some really really minor differences, but they are both based off the same framework as you know, so why would they be that much different. TBH though, if you do include the habits, syntax, and actually how people look at you, C# is the better language to go for. Even Microsoft is biased against there own language, as they don't hire Vb.net programmers for the most part, only C# ones.


For a C# Solution:
Well I could just re-show you the info from the MSDN website, but I decided it would be better just for you to read it:
http://msdn.microsoft.com/en-us/library/...s.71).aspx

Now look at this screenpic, and for each file, find it on the webpage and read the description. Also the "things" which are references under the references folder are not files, don't look them up. I suggest you look at the Class Library which I have a link to below to find out more.


Also here is a couple links which should help you out a lot:
http://msdn.microsoft.com/en-us/library/dd409559.aspx
http://msdn.microsoft.com/en-us/library/x53a06bb.aspx
http://msdn.microsoft.com/en-us/library/6a71f45d.aspx
http://msdn.microsoft.com/en-us/library/....100).aspx


Those will have you on your way on the right track in no time.
Reply
#8
C# Programs also in general have smaller binary file sizes in comparison to it's brother VB.net conversion, because Keywords are less used in C# to end or stop statements and methods, and even classes and namespaces for example.
Reply
#9
Thanks guys. Also, I found a great web-site with step-by-step tutorials. It's really detailed and I'll post it here, in case someone else founds it needed. http://www.homeandlearn.co.uk/csharp/csharp.html
Reply
#10
I would follow these if you want some video tutorials, I know the creator of them and he is an excellent and skilled coder: http://www.youtube.com/watch?v=vN-_Belg8...c6XBneQOta
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)