VB.NET vs C# - A comparison of the two languages, how they are different, and where they are going

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024

ความคิดเห็น • 300

  • @anthonynorton666
    @anthonynorton666 2 ปีที่แล้ว +14

    Why do developers who criticize VB say it immediately succeeded BASIC while ignoring that Microsoft created an intermediate BASIC that introduced modularity. It's called QBASIC and I don't trust anyone's authority or criticism who is not aware of the real predecessor to Visual Basic. Not all programmers are hired gun developers. Some just enjoy coding and like to make programs that work for a selected venue.

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว +1

      Are you saying that I said that? I'm pretty sure I didn't say that but I'd love the time code if you think I did.

    • @anthonynorton666
      @anthonynorton666 2 ปีที่แล้ว

      @@IAmTimCorey The transition from basic to Visual Basic ~3:01.

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว +1

      So, as I suspected, I didn't say it immediately succeeded BASIC. I said that BASIC was something that everyone could do and that Microsoft wanted to replicate that process when they created Visual Basic. That doesn't mean that there weren't intermediate steps. It just means that this is what the goal was when choices were made about Visual Basic. By the way, I started in BASIC, I built apps in QBASIC, and I started my professional career in VBA and VB3. I moved up through VB4-6 and then over to VB.NET. I've been there, done that.

    • @anthonynorton666
      @anthonynorton666 2 ปีที่แล้ว +2

      @@IAmTimCorey I just feel leaving out the transition to QBASIC which was a major change introducing higher level programming concepts like scope, modules, nesting, and if I remember right stricter rules on data types, is never mentioned and everyone who talks about it acts as if we went from the Dartmouth College version to VB. Thanks for your time and videos.

    • @ali-17..01
      @ali-17..01 หลายเดือนก่อน

      Bbıbıbjjjjjj🎉jıbııııbujbııjıbbj🎉ikonu❤iki ıbjbı yy'da mv😊🎉🎉🎉​@@anthonynorton666

  • @louigta
    @louigta 3 ปีที่แล้ว +6

    In the Stackoverflow 2019 survey, VB.Net was not on the list to chose. Therefore the survey is wrong when it comes to determining popularity of VB.Net

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      Why do you think it was not on the list?

  • @mrright1068
    @mrright1068 3 ปีที่แล้ว +2

    VB.net is much more readable which makes it much more maintainable. Thankfully RemObjects Mercury will continue to develop, enhance and support VB.net so millions of programmers can continue down this saner path. After all why learn C# when just a little more effort you can learn C++ which gives you much more control.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      Well, this is definitely your choice to make. It isn't the one most people choose, but that's fine. As for why use C# when there is C++, it is because of the power C# offers us that is much more difficult to obtain in C++. Remember, it isn't just that C# and C++ look alike. It is also that it is a very similar syntax and style to Java, ObjectiveC, Swift, C, and even JavaScript. VB is similar to VBA and Basic. When it comes to comfort level, you probably aren't going to win people over easily.

  • @RalfsBalodis
    @RalfsBalodis 4 ปีที่แล้ว +24

    0:00 - Intro
    2:20 - Visual Basic history explained
    5:52 - Building VB and C# libraries
    8:43 - Writing code for C# library
    15:00 - Writing code for VB library
    27:58 - Calling the libraries in the application
    32:00 - Conclusions
    33:06 - Co Evolving VB and C#, popularity , direction.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Thanks! I added it to the description.

  • @philgriffin8687
    @philgriffin8687 3 ปีที่แล้ว +3

    Your vb for/next loop would be better as: For index as int32 = 0 to lines.count -1 ------ int32 being the variable type. It is clearer and will execute faster.
    Another for/next example: For f as double =0 to .9 step .01
    ps. I know this is intended as a quick comparison and not a lesson on vb.net but the As... can make a big difference to the performance of your code.

  • @gbmarshall
    @gbmarshall 5 ปีที่แล้ว +11

    I prefer vb.net. dont like case sensitive in c#. Any way around ie textbox1.text and c# doesnt automatically cinvert to textbox1.Text

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      If you are typing it out, Visual Studio will try to correct it for you with Intellisense. But, if you prefer not to worry about case-sensitivity, that's a good a reason as any to prefer VB.NET.

    • @exogendesign4582
      @exogendesign4582 4 ปีที่แล้ว

      Vb sucks

    • @bettyswollocks7217
      @bettyswollocks7217 3 ปีที่แล้ว +2

      @@exogendesign4582 Here's an idea, instead of writing comments like an immature six year old how about giving some reasons why you think that. And are you referring to classic Vb, Vba or VB.Net?

  • @bazkhaldoun
    @bazkhaldoun 4 ปีที่แล้ว +5

    There is no language like VB.net ... more than 15 years working as a developer, used many languages, but honestly, I do not find a language like vb... in .net example, it has the same capabilities and performance of c# and much easier and the code is more readable.
    for my opinion vb is the best language

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I am glad you like it. I'm not convinced it will last nearly as long as C#. Microsoft has stopped making changes to the language (not .NET, just VB) so that is a bit concerning.

  • @Bonezz024
    @Bonezz024 2 ปีที่แล้ว +1

    Thank you!
    Just joined a company that has a mix of both C# and VB.Net. I haven't used VB since pre-college days 🙃

  • @thomstunes6485
    @thomstunes6485 4 ปีที่แล้ว +1

    VB.NET is more friendly to me.... but no choice, I have to go with C# for exactly what you said... futur, more web ressources, more jobs...

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Yep, that's a common feeling. In time, though, my guess is that you will start to love C# (coming from someone who loved VB6 and VB.NET)

    • @thomstunes6485
      @thomstunes6485 4 ปีที่แล้ว

      @@IAmTimCorey I much prefer read VB.NET code rather than C#.... for pure reading, but C# offers some great thing that VB.NET does not, like "Using" which open any object and close it when finished as VB.NET still need to Instance, Open, do the code, and finally close the object...Anyway, your videos are great, and your diction is perfect for those who english is not their motherlanguage :)

  • @decmk75
    @decmk75 5 ปีที่แล้ว +2

    Hi, Tim
    I'm a VB developer from day one of VB 6, with Visual Studio 2010, almost 8 years I'm in VB.NET until December 2018 when I received solution written in CSharp. I was sceptical, can i learn CSharp and continue to work on received solution. Thanks to you with great and detailed videos, i watched almost 40 hours, I'm now all i CSharp. Definitely CSharp is the way to go. Thanks
    P. S. For quick small code testing I'm still using VB.NET, it's easier for me 😀

  • @arwahsapi
    @arwahsapi 5 ปีที่แล้ว +20

    Here I'm telling you a secret, don't tell anyone:
    You will find hundreds of useful methods in its assembly (Microsoft.VisualBasic.dll) which I often imported to my C# projects

  • @HenrikKleist
    @HenrikKleist 5 ปีที่แล้ว +5

    What I noticed is VB has more common things with Delphi.
    Delphi also is more wordy than C# is and have the same for "loop" syntax.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Yep, it does.

    • @issiewizzie
      @issiewizzie 4 ปีที่แล้ว

      wow Delphi ...thats going back

  • @viessemondo4241
    @viessemondo4241 ปีที่แล้ว +1

    i use vb net since 20 years, i think i will never change. I tried to learn c# but i realize that vb net is much better
    this is my opinion

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      Everyone has their preferences, and that’s great.

  • @DreigoUndead
    @DreigoUndead 2 ปีที่แล้ว +1

    Worked with VB.NET for 8 years, C# 5 years.
    I think VB.NET is still superior in desktop application, primary because WithEvent keyword.
    Syntax is more readable, especially in multiple nested loops or ifs.
    Yes, it has more letters, like End Class, but you do not write them. But delegates can get a little messy. Also "AndAlso" (C# &&), "OrElse" (C# ||) keywords are bs :/
    For me, a lot of C# syntax errors is variable letter wrong case, writing single "=" in if, naming variable before datatype and that f****** ";". All solved by VB.NET.
    My issue with C# syntax is its origin, that was created for ancient computers to compile more easily. So it solves problem that no longer exists.
    PS. Dim output As NEW List(Of String)
    PS. Writing VB.NET code, more often I search for C# or just .NET
    So sad VB.NET gets no love.

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      I'm not sure what you mean by C#'s origin being for "ancient computers to compile more easily". That's not why C# was created. C# compiles into IL, just like VB. Compile time has never been the issue. Community adoption has been. People are generally more comfortable with the C-style syntax compared to the relatively unique VB syntax.

    • @DreigoUndead
      @DreigoUndead 2 ปีที่แล้ว

      @@IAmTimCorey
      My bad with explaining.
      I meant syntax (inherited from C) that was created in 1970s.
      Low computer performance at that time forced syntax to be more technical, so computers did not struggle as much interpreting it.
      And this is why we have to write ;:{}()[] ect. in places, that makes no more seance, only makes writing code slower.
      Same as for & switch keywords, for example, are much more complex then they should be.
      Same applies to Java and other C syntax derived languages.
      C# has done a great job making code more readable, comparing to C, but it's still ages away from VB, Python ect.
      Like, only with C#9 we got target-typed constructors, so you don't have to write data type twice while declaring global variable, and we still cannot access property private fields (2021 mind you) :/
      That's why I say that C# syntax solves problem that no longer exists.
      Yes, VB syntax is unique, and likely the cause why it's half dead.
      [Opinion] It's not the language you have to master, but frameworks, OOP and other concepts, to write code.

  • @StudentCompanion
    @StudentCompanion 5 ปีที่แล้ว +6

    Thanks for the great video again. I also studied VB at university but transitioned to C# almost immediately after graduating. I found in the industry in my area more people were using C#.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      You are most welcome. Thanks for watching.

  • @poordelir
    @poordelir 4 ปีที่แล้ว +2

    I was in doubt. I asked myself should I migrate to C#?
    Now I have a reasonable answer. I will continue my journy twards C#. :-) Thanks.

  • @ClassicGameHacking
    @ClassicGameHacking 5 ปีที่แล้ว +8

    VB.NET vs C# is indeed just personal preference, I prefer C# because porting C++ or Java code to C# and vice versa is very easy, VB is to "wordy" to my taste. VB is nice to people that have 0 programing experience.
    BTW, we should BAN { } for single lines.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +2

      I agree with everything but your ban on curly braces for single lines. I covered that in my C# Best Practices video. That's a personal preference based upon experience, though, not the end of the world.

    • @ClassicGameHacking
      @ClassicGameHacking 5 ปีที่แล้ว

      @@IAmTimCorey I know the ban thing will get your attention, I watch a lot of your content and I love it.

    • @israelochoab3113
      @israelochoab3113 5 ปีที่แล้ว +1

      I agree in some parts of langueage, in VB you can write
      VB
      With Object
      .Property1 = "value 1"
      .Property2 = "values 2"
      .Method()
      .Method2()
      End With
      C#
      Object.Property1 = "value 1";
      Object.Property2 = "values 2";
      Object.Method();
      Object.Method2();

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      @Classic Game Hacking - HA! Nice one.
      @Israel Ochoa B - You can do something similar upon declaration in C# (not any time like in VB.NET) by doing something like this: Person p = new Person { FirstName = "Tim", LastName = "Corey" };

    • @israelochoab3113
      @israelochoab3113 5 ปีที่แล้ว

      @@IAmTimCorey Not equals but something like this : Dim p As New Pol() With {.fieldName="Israel"}

  • @ComeAndPlayWithGames
    @ComeAndPlayWithGames 5 ปีที่แล้ว +1

    I'm a CS major student and learned VB.NET for my required GUI programming classes.
    I really enjoy VB.NET, however knowing the direction Microsoft is taking I with .NET i feel like my school should have taught us those classes using C# instead of VB.NET. Fortunately for me I'm familiar with C++ and Java and with my experience with VB.NET transitioning to C# doesn't seem too difficult, although I still feel like learning C# in those classes would have been far more beneficial.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Yeah, C# would have been a better choice but once you start working in C#, it will become easier and easier and what you know will start to translate into C#.

  • @AndrewErwin73
    @AndrewErwin73 5 ปีที่แล้ว +1

    I started out as a VB developer (3, then to 6)... once I got into .NET, I only used VB.NET for a short time when I started on a project that was already written in C# Once I started writing C# I never looked back.

  • @KouroushMetal
    @KouroushMetal 5 ปีที่แล้ว +1

    We start 12 years ago with vb.net and the first problem was the dim. you can put anything to anything, put string to int, string to decimal and ext. and when project grow, it crash big time. second was the help. you search some troubles and nothing came back. finally we force to convert c# help to vb.net and use it then. after these cases, we switch to c# 8 years ago and never look back!

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      The amount of help you can get is a pretty big selling point for C#.

    • @bettyswollocks7217
      @bettyswollocks7217 3 ปีที่แล้ว

      @@IAmTimCorey It is but I do a lot in VB.Net but I often look for solutions in C# and just convert the code which as you know is very easy to do.

  • @loudfiero
    @loudfiero 5 ปีที่แล้ว +3

    If index Mod 2 = 0 Then output.Add(lines(index) is all on 1 line without needing the "End If"... What's wrong with that? And you can make it 1 line in C# too.
    Also, when you declare a function in VB, the function name is added as a local variable automatically, so you never had to declare the "output" variable. You could have just initiallized : LoadFile() = New List(Of String). So in the If/Then statement you could have just done LoadFile.Add(lines(index)) ... So C# functions force you to be wordier by NEEDING a separate return variable... /sigh

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +4

      We can do either in one line (no, you don't need a separate return variable in C#). The point wasn't to teach "intro to VB.NET" or "Intro to C#". The point was to compare the same syntax between the two languages.

  • @Taskiman
    @Taskiman 2 ปีที่แล้ว

    When I was a teenager, I didn't go to school anywhere because of economic problems. But I like to make some applications and I learned VB language self-taught, Until many people bought it. And now I want to learn C# language, thanks for sharing the information.

  • @wjvelasquez
    @wjvelasquez 5 ปีที่แล้ว +1

    i come from Visual Basic, since VB 4. VB6 is great, but when i try to change to VB.NET en 2001 VB.NET was si weird. Then i keep en VB6. Later in 2003 i changed to C#. C# is more "normal" and is, for me, the best Choise.
    Don't misunderstand. VB.NET is a very powerfull languaje. Is just a choice

  • @in_absentia
    @in_absentia 3 ปีที่แล้ว +2

    Great video, thanks. Love the syntax of vb.net, gonna switch to c# in the future (cause I have to, not that I really want it ;)).

  • @moranjackson7662
    @moranjackson7662 5 ปีที่แล้ว +1

    The variable declaration can be much shorter in vb.net.
    In your example it shouldn't be
    Dim output As List(Of String) = New List(Of String)
    but
    Dim output As New List(Of String)
    just for clarification ;)
    I'm using more C# than vb, though...

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      True, I was trying to show an apples to apples comparison. I could have used var in C# to shorten it as well.

    • @JMairboeck
      @JMairboeck 5 ปีที่แล้ว +1

      and the equivalent of using var in C# would be to omit the As List(Of String) part in vb.net (which is actually optional).

  • @stefanocancelli8654
    @stefanocancelli8654 5 ปีที่แล้ว +6

    For index = 0 to 20 step 2 .... to increment using a different value
    I started as a vb 3 developer and moved through to vb 4,5,6 then vb.net and now c#
    I really dislike curly brackets to this day especially with many nested structures and i think using function names for uncommon operators like mod, is more user friendly than hacing to remember single character operators for all but the most common.
    I truly believe having witnessed the adoption of c# over the years over vb.net is due to the number of c++ developers having to use the .net framework and certain attitude of elitism that loiked at vb as a programming language with condescension.
    Theres my rant 😊. C# has won but it is not the most productive choice of the two especially for the more casual software developer.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +2

      Thanks. I was attempting to get an apples to apples comparison to show off the differences in syntax, not necessarily trying for the most efficient way in each language. As far as it being C++ developers who are now using .NET, I'm not sure that is it. I loved VB6, even though I also developed in C and C++ (and Java, VBA, FoxPro, and a number of other languages - I was a consultant). When .NET came out, I tried both C# and VB.NET and initially stuck with VB.NET. However, after a larger project forced me to use C# for a while, I fell in love. The biggest difference for me was readability. People who like VB.NET tend to hate on the curly braces, semicolons, and mostly blank lines. However, I found that it was easier to see the code when it didn't look like a paragraph in a book. Replacing "End Sub" with "}" made my actual code stand out more. So even though I was primarily a VB.NET developer, I moved over. At this point, since the syntax is so similar to C++, Java, and JavaScript, new developers easily focus on C#. They've probably never even seen VB.NET. As for VB.NET being more productive, I'd have to disagree there. First of all, productivity depends on skill/comfort. That will be different with every person. Second, there is 10 times the help on Stack Overflow and easily that ratio of articles out there on C# vs. VB.NET. The same with training videos. Therefore, it is actually harder to get started in VB.NET because there is less support. It might have once been the case, but it isn't any longer.

  • @SilentPrayerCG
    @SilentPrayerCG ปีที่แล้ว

    21:54 you not specifically says it's it, but you actually do, when you say it's =0, and 0 is int. If I'm not mistaked, if you type for index = 0.0F it will become single (float32) - It's for sure this way when you just declare variables, but I think same applies to FOR cycle in this rendition of language.

  • @DerMaikNichJa
    @DerMaikNichJa 5 ปีที่แล้ว +1

    I believe developers should learn as many languages as possible. If one starts developing other languages might be better to start with but I would never say no to the Question: Should I learn this?

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +2

      There is a balance. It is better to know one language really well rather than know multiple poorly. My recommendation is to learn one well and then supplement it with complementary languages.

  • @georgetuccio6053
    @georgetuccio6053 4 ปีที่แล้ว

    As usual another quality video from Tim Corey. My only comment, which I hope is helpful to all, is in the area of where VB.Net ability may be helpful. First, there are some commercial apps out there that are written in VB.Net and that have SDKs written in VB.Net. Their documentation and examples are in VB.Net and their classes written in VB.Net so, why not write your API code to interact your app with those apps in VB.Net. Also, if you're looking for good work, projects that are converting from VB.Net to C# are out there.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I get what you are saying but don't forget that C# can call VB.NET libraries natively (no conversion needed). So it is perfectly fine to have a library written in VB.NET that is called by a C# application. An API is even more flexible. The caller should not care what it was developed in. In fact, you can call a VB.NET API from JavaScript, Java, XCode, etc. The area where I see the benefit to creating VB.NET applications to talk to your VB.NET libraries and APIs is when your team creates both. Then you can create all of the code in the same language and keep complexity down.

  • @briankarcher4418
    @briankarcher4418 5 ปีที่แล้ว +8

    VB.NET is basically Microsoft's red headed stepchild. Everybody tries their best to forget it exists. Microsoft themselves forgot about it in .NET Core 1.0. There's no reason to know VB.NET. There are far more resources, code examples and tutorials in C# on the Internet. Search a .NET related question on StackOverflow or Google and 99.9% of the time you will get your question and answer in C#.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      It takes time and resources to build a language and Microsoft is putting their money where the demand is. They are still investing in VB.NET, just not quite as heavily.

  • @russellkemmit73
    @russellkemmit73 5 ปีที่แล้ว +1

    GEEZ, did your SUBS rise that high within like 3 weeks? What the heck happened? Keep Rockin!

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      I gain about 1,000 subscribers every week or so. Thanks!

  • @XDBjoernXD
    @XDBjoernXD 5 ปีที่แล้ว

    Oh, man. I was a trainee programmer in a timespan of three years now. The company's programming language was VB.Net. I have decided now to continue Vb.Net in order to write quality code and to get a good understanding on the basics first. Therefore I push C# to my future plans. Luckily there are just minor differences, 'cause of the .NET Framework :)

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      I'm glad you have found your niche for now.

  • @hydropascal
    @hydropascal 3 ปีที่แล้ว +2

    You've answered exactly what I was wondering about VB.net and C#. Your clear pronunciation makes me happy because my mother tongue is not English.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว +1

      Excellent! I am glad my content has been helpful.

  • @khillo9406
    @khillo9406 3 ปีที่แล้ว

    Well I use both of them (Actually bot hare the same), for the web projects I Use c# for WinForms and WPF I use VB
    But to be honest I feel more comfortable with VB
    1- Intellisense much better
    2- Code completion is better
    3- better handling for events
    3- Modules
    4- (This is what I like most) in WinForms, you can update form and form controls, from another form which amazing (possible in c# but need workaround in vb natively supported)
    Finally, both of them are great and anyone want to start with .net for sure i suggest c# bigger community, and its the future
    thanks TIM for this great video

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      Thanks for sharing your experience and perspective

  • @pauloflaherty6757
    @pauloflaherty6757 3 ปีที่แล้ว +5

    Excellent video. Thanks. Are you able to recommend any resources for those with some familiarity with VB and VB.Net moving to C#? Like where you mention that Void just means it is equivalent to a Sub.

    • @Thunderbuck
      @Thunderbuck 2 ปีที่แล้ว

      Tim's own tutorials are excellent for learning C#. The Tournament Tracker is a good, basic C# app and TimCo is absolutely epic.

  • @arthurnamu5770
    @arthurnamu5770 5 ปีที่แล้ว +1

    Tim, on a serious note.
    When are you going to XAMARIN the internet for the rest of us?
    My progression too was vb6, vb.net and now C#.
    I agree with you on this one totally

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Xamarin tutorials are coming soon.

    • @littlejibari
      @littlejibari 4 ปีที่แล้ว

      @@IAmTimCorey honestly sir, i find it hard to learn mobile development using android java. i think i could learn mob dev if i use c# but i couldnt find a decent tutorial who speaks really clear. i ve downloaded a lot of indian tutorials, i just get dozed off after a few minutes.

  • @MrModify
    @MrModify 3 ปีที่แล้ว +3

    C# has too much syntax baggage. More questions are asked about C# because it is harder to learn. VB.net translates to human thought better than C#.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      That's a thought, but with C# conforming to the same (or very similar) standards as other common languages (Java, JavaScript, C++, C, etc.) and VB being unique in how it does things (unless you count VBA), VB is the odd-one out here.

    • @rogerhamre8656
      @rogerhamre8656 3 ปีที่แล้ว

      @@IAmTimCorey VB is not a member of the C family of languages.
      VB belongs to a family of programming languages where Pascal and Delphi and several other languages along the same line are present.
      For short, VB belongs to a group of non-curly bracket-languages that are using begin and end tags instead of the curly brackets. Ends of blocks are in VB not only labeled with "End" but even with the block type (cf. End If, End While, End With...), which contributes to making code more readable in longer code segments than just a "}". (Though: Less important now maybe with modern IDEs.)
      That said, I do not accept the either/or between VB and C# either. You may have to learn and understand some differences regarding the For loop syntax in VB and C languages, but apart from that, source code is very easily translated between C# and VB.NET. I find it very easy to express the same thing in both languages.
      What I sometimes have been missing in C# is the Module concept of VB which allows us to build up an environment of "immediate language extensions", i.e. keywords (for functions) that you can use right away without any mentioning of any class (and maybe have available as a “common dictionary” across classes). Extension methods sometimes help us out here, though.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      @Roger - I think you are looking for static in C#. If you create a static method in a class, you can call it directly (like you can Console.WriteLine, etc.) without instantiation. As for VB not being a member of the C family, I understand that. That's what I was explaining. The C family is a much more common structure and while it has some similarities to Pascal and Delphi, neither are really popular languages today either.

    • @rogerhamre8656
      @rogerhamre8656 3 ปีที่แล้ว

      @@IAmTimCorey Thank you very much for your answer!
      Yes, in C# I can include a “using static” directive referencing a static class (the directive must be present in each file referring to the static class). As far as I understand it, that is as close as I can get to VB Modules in C#.
      I want to say that I have been enjoying your C# videos a lot, and that I have learnt much from them - equally well for a VB context as for a C# context. Your source code examples have been translated “simultaneously” (or almost) to VB.NET while “watching & pausing”.

  • @feitan8745
    @feitan8745 5 ปีที่แล้ว +11

    Thanks man, i asked you about the difference between them a while ago, and you really did it *-* you're a great man.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      I'm glad you enjoyed it.

    • @yawmlauglaug2899
      @yawmlauglaug2899 3 ปีที่แล้ว

      @@IAmTimCorey ໄປເບງິມັ້ງ

  • @MrAmralaa
    @MrAmralaa 5 ปีที่แล้ว +2

    i am a vb developer since Qbasic under dos , currently i use C# more often , but i really missed Module in VB

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      I can understand that.

    • @ManeOuattara
      @ManeOuattara 5 ปีที่แล้ว

      Amr Alaa - You can use a static class in C#, if you want to mimic a VB6 module.

    • @khillo9406
      @khillo9406 3 ปีที่แล้ว +1

      @@ManeOuattara static class in c# not same modules in vb

    • @ManeOuattara
      @ManeOuattara 3 ปีที่แล้ว

      @@khillo9406 - In 32 bit VB6, modules were mostly used to provide variables with global scope, to the application. You can mimic that in C#, with static classes (no need to instantiate just like VB6). I never claimed that VB modules and static classes were the EXACT equivalents of each other, from a functionality standpoint.

  • @danielrestreporuiz6074
    @danielrestreporuiz6074 4 ปีที่แล้ว +1

    Thanks for sharing your opinion on this topic, I've done the transition from VBA to VB.NET and frankly I was in love with VB.NET, but I was a bit worried with the lack of tutorials here on youtube for VB.NET in comparison to the great amount there is for VBA. You have cleared my doubts and I have decided to transition to C#. Thank you!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Glad it was helpful!

  • @PlotCalc
    @PlotCalc 4 ปีที่แล้ว

    1. Dim output as new List(of string) < it's more comapakt !!!
    2. if index mod 2 = 0 Then output.Add(Lines(index)) < it's more comapact !!!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +3

      This was an attempt to do an apples to apples comparison of the two languages. Yes, you can make VB more compact but you can also make C# more compact. The problem is that they do things in different ways and it isn't a clean comparison. Besides, more compact does not mean better - arguably, your second example actually makes it harder to read the code. Not that it isn't clear but there is more going on with this line. It makes code scanning harder to do.

  • @boredesmo9506
    @boredesmo9506 4 ปีที่แล้ว +1

    why dont you just symply write: Dim output As New List(of String)? In this form it's better than c# in my opinion. I still prefer VB.net vs c#

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I was trying to compare apples to apples. We could make both the C# and VB.NET statements shorter but then they would not compare as easily.

    • @boredesmo9506
      @boredesmo9506 4 ปีที่แล้ว

      @@IAmTimCorey Thanks for you answer!!

  • @pierreplourde
    @pierreplourde 2 ปีที่แล้ว +1

    I’ve done Vic Basic on the Commodore VIC-20 as a kid, then Pascal and C in my BSC (honours chemistry) days. Self-taught some C++ (console/DOS) and now learning and loving C#. VB.NET Functions vs Subs throws shade of Pascal Functions vs Procedures. On the other hand, the Basic I learned was an interpreted language while VB.NET, like the C-series and Pascal, is a compiled language.

  • @idoha
    @idoha 4 ปีที่แล้ว

    Function D6 as Integer
    static dice as new Random
    return dice.Next(1,7)
    end sub
    public static int D6
    {
    Random dice = new Random();
    system.Thread.Threading.Sleep():// produce random set dice throw Why
    return dice.next(1,7);
    }
    :

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Don't instantiate your Random object inside the method - it leads to non-random numbers. As for the Sleep method, don't do that either. That isn't how you get a random value. It is probably masking the issue with instantiating Random inside the method. Check out this video on Random: th-cam.com/video/kW84q8WOBdU/w-d-xo.html

  • @andywalter7426
    @andywalter7426 5 ปีที่แล้ว

    For me, I got my start in vb 6.0 and moved to .net when 2.0 came out. It was just last year I moved to c#. A few years ago, I tried c# but got too lost but then last year, it made more sense. I have been redoing all my programs in c#. the parts that are actually easier in c# are generics especially when a class has several typed parameters. Plus c# was easier for lamba expressions and even linq. It was good to know that c# is even better when implementing several interfaces which i started to do after wathing the videos on interfaces. There was only one case i could not get to work in c# but through interfaces, i was able to use the vb.net one from c# and make the vb one implement the c# interface as well.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      Yeah, the initial transition can be rough but after a bit, it starts to really click.

  • @chefbennyj
    @chefbennyj 5 ปีที่แล้ว +1

    I also coded vb.net prior to c#. After a while I found vb.net too "wordy", and c# was faster to type when " I'm on a roll" 😂 if I had to write "if then end if" instead of "if { }" I was gonna pull out what hair I had left... 😂 One other funny thing is I learned lamda expressions from your channel in c# and probably couldn't even do it in vb.net. break out resharper!

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      Glad you enjoyed it.

  • @SilentPrayerCG
    @SilentPrayerCG ปีที่แล้ว

    19:20 why not just Dim outout as New List(Of String)? it's will be less wordy

  • @Notion615
    @Notion615 5 ปีที่แล้ว +4

    another great video! Thanks so much for all the effort you put into teaching others! Keep it up!

  • @adamonjourney3726
    @adamonjourney3726 4 ปีที่แล้ว +1

    Dear Tim, thanks for this important video and your advice. Since Microsoft said, that VB.NET is not evolved as language any more and there are still companies with VB.net developers out there.. would you give them that advice to learn C# beside and change development language strategy for future projects? I know, that with VB.net (with .NET Framework) it is still possible to develope great applications... but... it´s now time to change for the better and skip to C#? Are there so much important new features out there in new C# Version which might differ significantly from (old) VB.NET?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      VB still has a future, but it is considerably dimmer than that of C#. I would recommend transitioning over to C# if possible. The good news is that you can keep all of your VB class libraries and use them with C# so the transition does not need to be instantaneous.

    • @adamonjourney3726
      @adamonjourney3726 4 ปีที่แล้ว

      @@IAmTimCorey Thank you. :)

  • @JaimeHaddad
    @JaimeHaddad 5 ปีที่แล้ว +3

    Excellent video. Very objective and must of all updated! Agree with your conclusion. You helped me to decided where do I need to direct my path!

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      I am glad it was helpful.

  • @andyhudsonsynthpop
    @andyhudsonsynthpop 5 ปีที่แล้ว

    Honestly for most people its just a preference and it doesn't matter, but anyone coming into .Net now would be well advised to go down the C# route if only because Microsoft seems keen to ditch VB. I love VB and I do find it interesting that lots of people believe VB.Net is easy and C# isn't. Just taking your example, is one really more or less difficult to learn than the other? I think that attitude is a hangover from earlier times and whichever you do, you just get used to the syntax in the end. Switching between VB and C# I find it interesting that VB seems to auto correct more, especially with case, which tends to capitalise more whereas C# uses lower case more, variable types, true and false etc. C# catches me out more because it is a lot stricter, but also it doesn't auto correct case mistakes. I guess the more C# I do the less this will matter, but I can't say that I find C# any more difficult than VB.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      Anything becomes easy once you are familiar with it. So comparing something you are familiar with to something you are not is always a lopsided comparison. Glad you enjoyed the video.

  • @vbywrde
    @vbywrde 3 ปีที่แล้ว

    My understanding is that the 2019 StackOverflow Survey has no reference to VB.Net because they did not provide VB.Net as an option to select throughout the entire survey... which reflects, I think, the preponderance of C# developers on StackOverflow. I don't know how much StackOverflow actually reflects the totality of the software development environment. For instance, I hardly ever used StackOverflow to ask to VB.Net questions. Nor did the people I worked with. But we were a VB.Net shop, like most of the shops I have worked for in corporate America. In fact, our management resisted hiring C# programmers because we were, and always had been a VB shop, starting with VB 5, VB 6, and then into the world of .Net. C# was not something our management wanted to mingle with VB.Net. I suspect that much of corporate America did the same, and for the same reasons. Though over time, as consultants came in with C# skills they would create C# code, and compile it into DLLs and fuse them with otherwise VB.Net projects. However, whenever this happened management would realize that after the developer left, we were stuck with code in C# which wasn't something the regular development staff was trained in or had experience with. After a while they stopped hiring consultants who professed a love of C#. That may have changed over time, but as of 2014, that's what our office environment was like, and again, I suspect ours wasn't the only one. So the point here being that VB.Net may be represented in a world that StackOverflow doesn't necessarily connect with that well, and therefore going by what's on StackOverflow may be misleading. Especially given that they specifically excluded VB.Net from their survey.
    I'd also like to point out that VB.Net, via the Visual Studio IDE, is not case sensitive like C#, and automatically fixes cases for variables in your code, making code maintenance easier with VB.Net than C#. I have had a situation where there was a case specific variable name error in one of the consultant's code. It took a great deal of effort to actually locate it, whereas in VB.Net such an error would simply never have occurred. It makes me wonder how many subtle errors are out in the wild in C# because a case was mishandled, but the developer never noticed. My guess? Across the entire global C# code base, more than a few. Whereas in the entire global VB.Net code base, there are exactly zero. Just a hunch.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      I understand the thought, but the exclusion of VB.NET in the Stack Overflow post has to do with usage. The number of posts could indicate that VB.NET users don't use Stack Overflow but I don't see evidence to support that. Let's look at another metric: open source projects. How many use VB.NET? On GitHub as of 2014, there were about 5,000 VB.NET repositories compared to 56,000 for C# ( githut.info/ ). Those numbers have not improved for VB.NET since then. Now you could say that VB.NET developers also don't use GitHub but if you say that then you are basically saying that VB.NET developers don't interact with the development resources like the rest of the world (which might not be that far off).
      At the end of the day, you can make all of the assumptions you want, but I don't see those assumptions being backed up with fact anywhere.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      Here are the updated numbers for today based upon a project query: 2,425,060 repos marked as C# projects to 68,800 for VB: api.github.com/search/repositories?q=language:c%23 and api.github.com/search/repositories?q=language:vb.net

    • @vbywrde
      @vbywrde 3 ปีที่แล้ว

      @@IAmTimCorey All I can tell you is my own experience. I have been programming since 1997 in mid-sized American Corporations. My experience tells me that the VB.Net Corporate developers I know have not used Github very much. At least perhaps until recently when MS acquired it in 2018, which isn't that long ago. Until then, and I would argue beyond then by a considerable degree, most of the shops I know were using other repositories that they kept in-house. Source Safe comes to mind. Clear Case comes to mind. What doesn't come to mind is GitHub. Now one thing I can say for sure is at the companies I worked for there's a lot of code being stored in-house (because it is considered proprietary and in-house has always been considered safer than using an external vendor, especially one accessed over the internet). How much code? I don't know. But I would venture to guess that a survey of Corporate repositories global would reveal that it actually dwarfs what is in Github by a considerable degree. And I would also venture to guess that a considerable percent of that code is in VB.Net. Can I prove that? Of course not. Does my experience, however, as a corporate programmer tell me that's likely, or at the very least not unlikely? Absolutely. Think this should be considered, frankly. Because it may be that a focus on what happens on StackOverflow and Github may well wind up being misleading.

  • @MBCDC1
    @MBCDC1 4 ปีที่แล้ว

    ~ 33:30 “2017 Microsoft said that they're done doing coevolution. VB.net and C-sharp are going to start branching apart from each other because they don't want to spend the time making sure that every feature goes into both languages and so there will be the idea that something has come to one language but not the other. Now that may raise some question marks in your mind. Okay if they're not going to be exactly the same anymore which one does Microsoft love more and that's not the best question because Microsoft even though they love certain things a lot and people don't, the reality is they focus on what people use or people want which means we should look at which one's more popular.”
    Well, that statement does not reflect reality very good. If we go back to the time when .Net Framework was designed, there pretty quickly came up the question what kind of programming-language should be build in to the Framework. At that time Visual Basic was the preferred language in the Microsoft cosmos and so it was obvious that VB had to be the No 1 language in .Net Framework.
    On the other hand Microsoft - as always - wanted to make as many programmers as possible use their new development system.
    Many programmers were skilled in other languages and development systems and worked with C++, Java, Java-Script, Delphi and others. So the question was on how Microsoft could raise interest in changing from - let’s say - Java or Delphi to the new .Net Framework. The answer was that a change had to be as easy as possible. So a .Net language had to be as close as possible in design and syntax to Java, Delphi and other’s as possible. Fortunately it happened to be that most of the other popular programming languages such as C++, Java, Delphi, Java-Script, etc. are fairly similar in design and syntax, but they differ quite a bit from Visual Basic, that indeed is very “wordy” and literally more of a “language” than most of the other systems. (BTW, therefore it is easy to read, easy to learn and over all easier to code in - at least in my opinion. But that is a question of personal preference anyway.)
    To cut a long story short, Microsoft came up with the concept of C#, that is a programming language that combines the integration of the .Net Framework concept and syntactical elements of those other popular languages.
    Despite the announces that Visual Basic will remain the No 1 language in .Net, over the years Microsoft eroded the position of VB in favor of C#. And indeed more and more developers began to write their code in C# - be it that they simply saw the “signs on the horizon” or they migrated from other languages to C#. And now we come to the point where Microsoft saw that it no longer seemed economically reasonable to develop two languages parallel. In 2017 the majority of .Net developers had switched to C# or started with C# from the get go.
    To state that “they focus on what people use or people want” is - sorry - ridiculous. They pushed C# over the years, gently but steadily, and brought the people to C# and now they “focus on what people use and want” - after they brought them there.
    With all that being said, the question of “which one does Microsoft love more”, should not seem to be so bad anymore. The essence is that Microsoft “loves more” all the pieces of software that let them make more money. And C# (unfortunately) seems to be a (well-prepared) winner in this sense.
    Despite the fact VB still exists, it will not really be further developed (unless there will be an economic reason in the future) and will be phased out with the time.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I don't ever remember a time when Microsoft said that VB.NET was the primary .NET language. I was a VB6 developer at the time when .NET came out and I knew at that time that C# was the primary focus and that Microsoft provided VB.NET (now just VB) as a way to easily transition into the .NET platform. Even as a person who loved VB6, I never felt like VB.NET was the way of the future. Instead, it was a stepping stone to get to the C-like C# language. Even back then, Microsoft had started to transition away from the "do it our way and like it" to the "we will meet you where you are at" just a bit. That's what C# is. In college you learn Java primarily. C# is very close in syntax to Java. It is also close to C, C++, and a number of other languages. It even looks like JavaScript (even though it is functionally very different). This is where most of the world is at. The only people that are familiar with the VB structure are VB developers. That structure is unique. It isn't something you easily transition to from another language. So yes, Microsoft focused on C# more and more because that is where they thought the community would most easily gravitate and they were right.

  • @BW022
    @BW022 5 ปีที่แล้ว

    I think real world issues win out over the merits or your personal choices. It is one thing when writing a few thousand lines of 1980s apps, Office macros, etc. to just use whatever you liked, but today applications typically require insane amounts of time, teams, efforts, documentation, testing, and technologies. As such... availability of developers, use of techniques, libraries, related technologies (such as web applications, server side development, etc.) typically trump your personal choices in languages.
    Most people know C, C#, or one of their variants. Easier to find programmers, libraries, documentation, etc. these days. Most shops are going to require the C# over VB.NET for most applications of reasonable size. If you are just writing something quick and easy... you'll typically be using whatever does it quickest and is available.

  • @ga6939russell
    @ga6939russell 5 ปีที่แล้ว +1

    I started out learning Basic because it was the favorite interactive language for most terminal-based systems back in the 70's. I was able to find books at a fairly reasonable price on Basic. I only held one IT job in my series of careers and it was coding in COBOL. I stuck with BASIC because I felt more comfortable with it even after Microsoft went to .NET. I eventually began learning C# over the years because I could see that it was becoming more popular with everybody. Again I never got another job where I could use my programming skills and/or learn advanced skills so I just tried to get along with what I could afford to use as learning tools. I'm not sure I am going to be working much at learning anymore as I my circumstances and motivations have declined.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +5

      Do what you enjoy, even if it ends up being just a hobby.

  • @jal000lx
    @jal000lx 4 ปีที่แล้ว +1

    Awesome , i was trying to find a way of combining two different languages finally got one , do you have any more examples to combine VB.net and C sharp

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I don't, but combining the two isn't hard as long as you separate them into class libraries. A C# class library can call a VB class library (and the reverse is true as well).

    • @jal000lx
      @jal000lx 4 ปีที่แล้ว +1

      IAmTimCorey : u might be right , but for amateur programmers / or beginners like me who is your follower I think one small example would be of great help , could you please take a small example and illustrate how can we combine csharp and VB.net ...

  • @Denvercoder
    @Denvercoder 2 ปีที่แล้ว

    I started with VB6 and VB.NET too.

  • @Noble-Technologies
    @Noble-Technologies 2 ปีที่แล้ว

    Thanks Tim, Very Good Video.

  • @attiliofiorentino8524
    @attiliofiorentino8524 4 ปีที่แล้ว

    I think that from a commercial point of view, Microsoft pushes on C # to bring Java developers closer ..... with VB would be impossible
    From a technical point of view, instead, VB is certainly simpler and if you work only with classes you cannot fully appreciate the syntax of C #.
    If you make massive use of interfaces, then polymorphism and inheritance, C # is better. Its type-safe syntax may seem obnoxious but it is very useful for understanding what type you are using and what you want to transform
    .
    In vb it is possible to take many advantage of implicit conversions (even with linq), with c # no.
    I loved VB, today I wouldn't be able to do without C #

  • @xtxmidnightxtx1784
    @xtxmidnightxtx1784 4 ปีที่แล้ว +1

    Hello! Young programmer here with a lot of experience with Visual Basic. Due to all the criticism of vb.net and its future I've been looking into C# syntax.
    Just wanted to say at 25:30
    There actually is a shorter way to declare 'output', very similar to what you did in the C# version
    Instead of:
    Dim output As List(Of String) = New List(Of String)
    You can just do:
    Dim output As New List(Of String)
    I also didn't know that format you use for putting variables in a string, I've always used
    "My String " & VariableName
    Or
    VariableName1 & " " & VariableName2
    So thanks for helping me learn something new, and thanks for this video!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Yep, I'm aware there are shorter ways of making that call. However, I was trying to get an apples to apples comparison. There are shorter ways of doing things in C# as well that VB.NET does not have.

  • @kcvinu
    @kcvinu 5 ปีที่แล้ว

    Since VB.net is an easy-to-use language, there is no need to ask questions in stack overflow. A simple vb.net book is enough. for this reason, you won't find more questions in "vb.net" tag in SO.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      lol, interesting theory but I doubt that is the case.

  • @trevorloughlin1492
    @trevorloughlin1492 3 ปีที่แล้ว

    When I removed a button from my c# code it had a nervous breakdown and came up with an error form and wouldn't let me back to my form to put the button back on. I then tried to get rid of the code for the button and things went from bad to worse. This sort of thing never happened in vb6.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      It sounds like you deleted the button but did not delete the event(s) associated with that button, so it threw an exception.

    • @trevorloughlin1492
      @trevorloughlin1492 3 ปีที่แล้ว

      @@IAmTimCorey github.com/assemblysoft/Assemblysoft.PureQuantum/commits?author=assemblysoft is the link to the code I had a developer write to get the 64 bit hardware random number generator working for my project. The old qng 32 bit devices were easy for a beginner to set up but the 64 bit ones are another matter. But I managed to delete everything (trying to get rid of the button code) except the hardware libraries so the exe files still work. So I directly downloaded the folder as a zip file and also used Visual Studio 2019 to get it directly from GitHub, but the (only) error was something about "missing security certificate" and something to do with the windows manifest so no luck, but he had previously installed it himself successfully so obviously as a relative novice I am doing something wrong. The code that I added was a translation of my working 32 Bit windows vb6 application which overcomes the "No Communication Theorem" with some clever maths allowing signals to be sent from the future to the present. So world domination is on hold. Please note that this part of the code will not be on GitHub any time soon.

  • @hadireg
    @hadireg 4 ปีที่แล้ว +1

    Thank you for this great video!
    I've started with Pascal, then assembly, then C/C++, learnt VB5 then VB6(including winAPIs) , I discovered gladly VBA as a fun dev within office, and fiddled around with C# & vb.net.
    one thing I always liked about VB spirit, is its simplicity and the case insensitivity. why in the would we want to name things with different casing?
    at least No argument about C/C++, it has total different powers that the modern fancy programmers don't need nowadays :) ~besides, I never wanted to learn Java.... I don't like it :D

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You are welcome.

    • @exogendesign4582
      @exogendesign4582 4 ปีที่แล้ว

      Yeah you can get a job with only vb. Haha good luck with that.

    • @bettyswollocks7217
      @bettyswollocks7217 3 ปีที่แล้ว

      @@exogendesign4582 Actually you'd struggle to get a job with only C#, you need to know a lot more besides. It's all frameworks, design patterns etc these days. Saying you know how to do a For loop in C# just doesn't cut it anymore ;)

    • @exogendesign4582
      @exogendesign4582 3 ปีที่แล้ว

      @@bettyswollocks7217 it was sarcasm. No one would hire you if you know one thing, full stack is way to go. By the way, I only do programming as past time and hobby to cater my business and maintain my own created POS system. But you are right, having just one tool in the box won't cut it.
      Everything is now shifting to web development and mobile.

  • @robertocallaghan576
    @robertocallaghan576 5 ปีที่แล้ว

    Interesting, I started coding on a Commodore 64, thru all versions of Visual Basic on windows into vb.net and have written over a 100 corporate applications using VB. Since watching your videos I've now started writing all new applications in C# which I find a more succinct language and (in my opinion) has greater flexibility. I've also started converting some legacy applications into C# as new features are required. Love C# but also still love VB.net

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      Glad you enjoy both.

  • @objectaware5296
    @objectaware5296 5 ปีที่แล้ว

    I would be interested in your thoughts on Python vs C#. It seems Python is rapidly gaining on C#.
    Java exceeds both C# and Python in terms of questions asked on S0

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +7

      Python is a good language and an easy one to pick up, especially for beginners. Java has been around for a long time. Personally, I'll probably get back into a little Python at some point, since it is useful for machine learning (although C# is coming close to feature parity in that space). I have never preferred Java. I don't like the decision-making of Oracle and the JVM seems quirky at times (at least it has - I haven't used it in a couple years). Pick the language that you feel most comfortable with and learn it well. Be careful not to bounce around and learn a little bit about a number of languages.

  • @IndellableHatesHandles
    @IndellableHatesHandles 3 ปีที่แล้ว +3

    The best part of VB.NET is that no-one can give you grief over where you put your curly braces.

    • @PIFFthePUFF420
      @PIFFthePUFF420 3 ปีที่แล้ว

      if your curly braces don't line up in the same column, maybe you deserve the grief

  • @ArnoldHiguit
    @ArnoldHiguit 5 ปีที่แล้ว

    I'm wondering why the TIOBE index is showing VB.NET is ahead of C#. Not sure what is the basis of this or where is the data taken from.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      I've always been confused by them. They seem to say that they are about popularity but not by percentage. More of a "how strongly is a language loved". Doesn't really seem to relate to the real world in any meaningful way.

  • @georgekaragiorgos
    @georgekaragiorgos 3 ปีที่แล้ว +1

    Great video/comparison, in all aspects! Facts-based, but without being absolute. Thank you Tim!

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      Thanks for watching!

  • @knuppknupp6382
    @knuppknupp6382 4 ปีที่แล้ว

    C# and VB.NET case is the proof that a fairly similar language, with mostly appearance differences, with the same level of power in most cases (in just a few slightly better or slightly worse), that translates to the very same code, using the very same core frameworks, can die just because. If VB.NET had support in new things (and that had stopped happening a lot earlier before Microsoft decided to stop co-evolution) it wouldn't abide by that self-fulfilling prophecy :p In any case C# is very easy to grasp if you really know VB.NET and not only just the older VBA, VB6 which in reality are very different languages in concept, capabilities and coding thinking.
    I'll always code more intuitively in VB.Net, but C# it is!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Yep, there are a lot of factors that go into the success of a language, platform, or even an application. There isn't one factor that makes something stick (although one factor can kill any of these).

  • @pjf7044
    @pjf7044 ปีที่แล้ว

    What language do you recommend for someone coming from JavaScript?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      I always recommend people at least try out C#. It is one of the few languages that you can learn where you can take your skills practically anywhere - Windows, Mac, Linux, iOS, Android, Web, Cloud, Gaming, etc.

  • @BryanChance
    @BryanChance ปีที่แล้ว

    I love visual basic. All the recent nocode/low code popularity, it's been here all the time. LOL

  • @nedeljkosovljanski4934
    @nedeljkosovljanski4934 5 ปีที่แล้ว

    You started with Atari??? My beginning was with 800XE. POKE and PEEK were my two favorites commands :) That was impressive period for coding. My kids can not imagine that I had 64K (minus 16K for OS) for coding. Every byte was precious.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      Yeah, I enjoyed those early days.

  • @wakerhouse
    @wakerhouse 5 ปีที่แล้ว

    Since a while i watch all your videos. You teach in C# but that doesn't matter to me. Normally it is easy to translate. This is a nice video and comparison because you are not so derogatory as many other C # developers. I am an electrical engineer and I have been programming in Vb .Net for many years and I program measurement software and evaluation tools with a lot of hardware, databases and very much data for our lab and our internal R & D department but also external customers. In the years we have developed our own framework for our purposes. But I also think about to change to C# for the reason that my resume looks better and all my job opportunities are for C#. But I have to convince my bussiness field manager because my whole department is programming in Vb .net. I never felt restricted but is Vb .net really at the end? Or what is the future of vb .net? Thank you

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      At an end? No, VB.NET has a ways to go before it is deprecated. However, the opportunities to work on VB.NET professionally are much smaller. I foresee that will only continue.

    • @wakerhouse
      @wakerhouse 5 ปีที่แล้ว

      @@IAmTimCorey Thank you for your assessment. Unfortunately, there is not much information about where to go.😥

  • @Fragmaster777
    @Fragmaster777 3 ปีที่แล้ว

    Hi! I'm trying to start new carrer in IT. I'm 34 y old. I learn C# since one year. Now I recived a job offer with VB.Net and I know nothing about it. I wanted and planned to work with C#. Should I take it as my first step in carrer or wait for occasion to start a work with C# and don't bother with VB.Net What you think? I told them I know only C# and worked with WinForms and WebForms before and they offered me a job with VB.Net and WPF. They said I will first try to maintain 10y old program and maybe then move with new programming features. What you all think? Should I take it? I don't want to screw up my career at the begining. Any advice?

  • @markyanthonylaredo2614
    @markyanthonylaredo2614 5 ปีที่แล้ว +2

    C# is case sensitive VB.Net is not..

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Yep, I mentioned that.

  • @GabrielM01
    @GabrielM01 4 ปีที่แล้ว

    Im starting to know what things in c# mean, so i guess i need just a little more time and testing to switch over from vb.NET

  • @passedwonder
    @passedwonder 4 ปีที่แล้ว

    Interesting and useful for comparing the two (and making me *more* worried about switching to C#). I would say there's one thing is misses though.
    VB.NET is both more more basic, and more visual ;-)
    I'm guessing you're preaching to the choir of 'Already programmers' but I've been pointed at this video as someone who's moving from 'writing code that does *extra* back end things for a database import extension in C#' to 'Writing those things, and to an extent that import itself, more directly in C#
    And whilst I'm at the point *now* where I think I can probably handle that, I think I'd have not gotten here if the 'Do extra stuff the import tool doesn't do itself' had been C# - I'd not have been as able to see what it was doing, not as able to engage with it, and slowly scale up the complexity of what I was doing..
    Yes, the curly brackets and % rather than 'mod' are quicker, more concise. But it's so much easier, as someone who played around with original basic on a Mac Plus decades ago, but has done little since, to see and understand
    'If A = 1 then
    Do this
    Do that
    Do the other
    End If'
    Than it is to easily see and interpret the same in a much more symbol based language, to know what the == means, realise you've forgotten the ; or keep an eye on your curly brackets
    So, for people who are already programmers, I think you're probably right, go, go C# Rangers! But for those who're slowly adding programming to what they do, then VB.net is going to be (and likely remain) a far easier way in for them.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Good points. I agree that C# can be intimidating to start. VB was designed to be that easier onramp to development. I do have a course called Foundation in C# that will help you get up to speed with C# in an easier manner, if that helps.

  • @gbmarshall
    @gbmarshall 4 ปีที่แล้ว

    Curious what other developers use on Transact SQL in Stored Procedures. Does anyone still use Stored Procedures in SQL Server or is it more popular to use database access code in Entity Framework - coded in C#?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      It depends on the team and the organization. A lot of organizations use stored procedures. Some push for Entity Framework though. I have found that the organizations that use Entity Framework are usually less likely to have people who really know SQL well.

    • @njoroge2061
      @njoroge2061 4 ปีที่แล้ว

      @@IAmTimCorey Is it worth learning visual basic and what are the difference between vb.net which should i begin with vb or vb.net.

  • @codesplasher
    @codesplasher 5 ปีที่แล้ว

    Thanks Tim once again...

  • @RemcoJvGrevenbroek
    @RemcoJvGrevenbroek 4 ปีที่แล้ว

    In stead of wriring
    dim myobject as object = New object
    Jou dan witte
    Dim myobject as New object

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Yep. I was trying to keep the syntax similar to C# for an "equal" comparison. This shortcut doesn't translate to C# directly, just like some C# shortcuts don't translate to VB.NET directly.

  • @DamianWalczak
    @DamianWalczak 5 ปีที่แล้ว

    everyone will be biased based on the what language he/she/ze was exposed to first, I dabbled with javascript/java then moved to c# which looked very similar, after 18months I had to pull some legacy code written in vb.net and to me it looked not as clear as c# but again it was looked through eyes of someone working with curly braces and statement terminators all the time. new versions of c# try to combat that, you can see this with lambdas and even simple if statement if it is just one line you dont need curly braces. I bet when vb.net dinosaurs looking at these new c# features they rolling their eyes :D

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว

      It all depends on what you are comfortable with. I was comfortable with VB.NET and preferred it but once I became comfortable with C#, I much prefer it to going back to VB.NET.

  • @swordblaster2596
    @swordblaster2596 5 ปีที่แล้ว

    I don't use VB.Net any more, but they are so close apart from some different syntax that any vaguely competent dev should be able to switch back and forth very easily. You can tell there's not much difference when the c# snobs have to resort to "it's too verbose" as the main criticism.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +2

      I don't think snobs is a great way to put it. People can have their preferences and their reasons don't have to meet your standard of "good enough".

  • @njoroge2061
    @njoroge2061 4 ปีที่แล้ว

    Is it worth learning visual basic and what are the difference between vb.net which should i begin with vb or vb.net.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I would say no. The amount of jobs out there for VB are small compared to C#. As for VB vs VB.NET, they can be the same thing. However, originally VB referred to the pre-.NET language Visual Basic (the last major version of which was 6). That is still in existence today (although small). VB.NET is the .NET replacement for VB6. Eventually, they shortened VB.NET and called it VB. That's fine as long as you assume that VB6 is gone or not considered. However, it is confusing if you know about VB6 so I try to refer to VB as VB.NET or VB6, depending on what I am talking about.

  • @keissetje
    @keissetje 4 ปีที่แล้ว +3

    >Let's remove Class 1, I always do that in my projects.
    >Ok let's make a new class!
    Just rename the first class and save yourself the extra pop-up

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +5

      The problem with that is that you have to do it in two places. You can have a file named Person but the class inside is Class1 or you could have the class named Person but the file named Class1. If you do it in the right order, it will rename the other but if you mess it up, you cause issues. Instead of going through the two steps, just delete it to be sure.

  • @ManeOuattara
    @ManeOuattara 5 ปีที่แล้ว

    This was a good video. But I wouldn't say that VB.NET and C# are functionally the same. As far back as I can remember, C# has allowed the use of pointers through unsafe code, and VB.NET didn't. Other than that, and the fact that compiled C# can sometimes run a bit faster. I guess they're similar though.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Compiled C# and compiled VB.NET will be exactly the same unless you wrote your code differently. They both compile to IL and for years, Microsoft had the concept of co-evolution. It is only now in the past couple of years that they have again separated. There have been small differences based upon how C# or VB.NET did things where it didn't make sense to implement in the other language but otherwise they are the same. Speed-wise, there is no difference.

    • @ManeOuattara
      @ManeOuattara 5 ปีที่แล้ว

      @@IAmTimCorey - Even though Microsoft was adhering to the co-evolution concept for many years. VB.NET has never allowed the use of pointers. That is what I was trying to refer to. If one were to utilize pointers in a certain coding situation using C#. There is no conceivable situation where VB.NET can compile to the exact same IL, because there is no VB.NET equivalent functionality for that case. And in many situations, the use of pointers can allow C# to outperform VB.NET. That is my point.

  • @icecold3226
    @icecold3226 5 ปีที่แล้ว +2

    When you're used to code in C# its kinda hard for the first time coding in VB becaus the syntax in C# is a littlebit cleaner
    Further i like both languages

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Yep, the syntax differences can be jarring but underneath, they are very similar.

    • @icecold3226
      @icecold3226 5 ปีที่แล้ว

      @@IAmTimCorey Yep

  • @bhavleensingh6929
    @bhavleensingh6929 5 ปีที่แล้ว +1

    Babbe tera jawab ni..love you

  • @tinym00n
    @tinym00n 5 ปีที่แล้ว +1

    yes so true!

  • @dinterdonato
    @dinterdonato 4 ปีที่แล้ว

    I started with vb3. currently I keep many projects in vb6 and vb.net. I love vb. Is a pity microsoft want to kill vb. But I think they do for 2 reason. Mainly, microsoft intend to compete with other languages like pyton, java, etc. So, Msft force to vb's community learn c#. The second reason, is more easy share knowledge and code between the same community.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      I don't think there is any hate towards VB in the Microsoft community. I just think that the rest of the world went the "C-style" route and Microsoft is just not fighting it. There is a lot of reasons why the C structure is superior - cleaner, less wordy, etc. but at the end of the day, it doesn't matter. If developers are used to a certain structure, forcing them to entirely abandon that structure when entering a new language can be jarring.

    • @dinterdonato
      @dinterdonato 4 ปีที่แล้ว

      @@IAmTimCorey I agree with you, in fact in this moment I'm studing blazer in order to make web proyect in c#. By the way, what is your opinion about this tool? Is the future? or is other silverlight?. Thank for you videos. I'm 41 years old and this video was motivator for me . Sorry about my english.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Your English is fine (well done). I think Blazor has a good future ahead of it. Web Assembly (what it is built on top of) is not a Microsoft thing (like Silverlight was) so it has wide support and is a standard. The Blazor team has already proven the capabilities and they have turned a fun exercise into one of the hottest topics in C#. It really does bring another option to the table (and a pretty big one with the ability to be a PWA or an Electron app). It isn't the only UI solution, nor will it be the right choice for every situation but it does provide a very nice option for developers. I think it will survive for a long time.

  • @israelochoab3113
    @israelochoab3113 5 ปีที่แล้ว

    You can Include F#, another great languege that run into de same intermediate langueage.

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +3

      Yep, and there are a number of others. I didn't include F# in this comparision for a couple of reasons. First, while it is growing in popularity, it isn't as popular as C# and VB.NET (Stack Overflow has only 13,000 asked questions compared to the 124,000 of VB.NET and 1.3 million for C#). Second, F# is a functional language, not an object oriented language. Comparing the two ends up becoming a bit of an apples and oranges situation.

    • @israelochoab3113
      @israelochoab3113 5 ปีที่แล้ว

      @@IAmTimCorey I agree with you and your great work.

  • @ourtvchannel
    @ourtvchannel 3 ปีที่แล้ว

    The ONLY reason Basic has died is because it is CALLED BASIC IMO. Anyone who thinks a language with a less readable syntax and case sensitivity in code is progress is mad. We don't have the memory and storage limitations of the early 80's. I remember the days when REAL programmers wrote in C and C++ and those that did the vast majority of business work used Basic. I always thought C# was a triump of marketing allowing people who used Visual Basic to claim to be real programmers and demand higher wages like the C programmers. You demostratied perfectly the key is the common Intermediate Language so it's just syntax for the sake of it largely. No doubt they'll try to move it more towards C++ now it is not "held back" by Basic. Great video.

    • @tomthelestaff-iamtimcorey7597
      @tomthelestaff-iamtimcorey7597 3 ปีที่แล้ว

      OK, I got to ask, please define "REAL programmers". Is it just the language they use? I laughed when Tim posted "No-Code Programming" th-cam.com/video/ah1tEvAkojI/w-d-xo.html because of all the comments from folks defining of 'real programmers'. I feel the definition is "relative".

  • @Alex-ik6pu
    @Alex-ik6pu 4 ปีที่แล้ว

    For make programs for windows, what language I need to learn?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      There are a number of languages that can make programs for Windows but C# is my suggested choice.

  • @AWESOME-ji9uc
    @AWESOME-ji9uc 4 ปีที่แล้ว

    on my country, some school still teach VB .NET including my school

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      The good news is that you can switch over to C# without relearning everything you learned. The structure will still be there, as will the OOP principles.

  • @UnityDevJourney
    @UnityDevJourney 5 ปีที่แล้ว

    I always wondered why vb does not have the ?: operator - unless I am missing something?

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Which one? The null coalescing operator or the null conditional operator? It has both, but with different syntax for the coalescing operator. The coalescing operator look like this: stackoverflow.com/a/6792791/733798 and the conditional operator looks like this: docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/null-conditional-operators

    • @briankarcher4418
      @briankarcher4418 5 ปีที่แล้ว +1

      @@IAmTimCorey I think he's referring to ternary operators.

    • @MingJianYap
      @MingJianYap 4 ปีที่แล้ว

      vb.net has If(a, b, c)

  • @MrNaiall
    @MrNaiall 2 ปีที่แล้ว

    c# or delphi

  • @MusfiqFahadAmin
    @MusfiqFahadAmin 5 ปีที่แล้ว +2

    Thanks for this detailed comparison, another amazing video from Tim, as usual! Just a small suggestion, if you could increase the font size, it would be much better for smaller screens. If increasing font size doesn't bother you or make you uncomfortable while typing, please consider this!

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      Thanks for the suggestion.

  • @nathanjoseph405
    @nathanjoseph405 4 ปีที่แล้ว

    I would like to learn VB.Net ,do you have any training videos which i can subscribe or available for one time payment ?

  • @leetdemon
    @leetdemon 2 ปีที่แล้ว

    What if you just want to write your own personal windows programs as a hobby? Which would be better? I really dislike the curly braces and semi colons lol.

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว +1

      I would recommend C#. There are a lot more examples out there to help you out when you want to do something.

    • @leetdemon
      @leetdemon 2 ปีที่แล้ว

      @@IAmTimCorey Thank you for the reply sir, C# it is :)

  • @SandhyaKumari-ir1bh
    @SandhyaKumari-ir1bh 8 หลายเดือนก่อน +1

    ❤❤❤❤

    • @IAmTimCorey
      @IAmTimCorey  8 หลายเดือนก่อน

      👍🏻

  • @loudfiero
    @loudfiero 5 ปีที่แล้ว +3

    LOL @ var vs. Dim! Dim output as New List(Of String) IS LESS WORDY than the C# version, which means var was put in to make it more VB-like. Stop intentionally making VB look bad. Why did you do that legal LONG version of variable declaration with instantiation? VB uses % to automatically declare a variable as in Int32. For instance Dim X% - for backwards-compatibility reasons with older BASIC languages. Dim A$ declares A as a STRING. Again - LESS WORDY. Also, why would you change the count on the for-loop to 0 to Lines.Count - 1 when 1 to Lines.Count is simpler and makes 100000% more sense? I believe whether a Namespace is declared or not in an IDE setting, just perhaps off for VB. VB users don't need to Import System.IO because we get the "MY" namespace that gives us better/easier accessibility to the machine like My.Computer.FileSystem. Yes, MORE WORDY but easier to use. And that's the general theme of VB vs. C# - it's easier for humans to read VB. VB's IDE is also just smarter than C#. Why would you want to name 2 variable with the same name but different casing? It just opens the door for bad coding / errors. In the end, C# only exists because Microsoft was threaten by the existence of JAVA. C# was made to lure JAVA developers to .Net. Perhaps your video should have compared JAVA to C# instead?

    • @IAmTimCorey
      @IAmTimCorey  5 ปีที่แล้ว +1

      I did the long version because I was trying to compare syntax, not try for the most efficient call for each language. It is the same reason why I didn't do Step 2 for the for loop. The point wasn't to show how to be most efficient in each language. This isn't a "how to get started in VB.NET" video. This is a VB.NET compared to C# video. The point was to introduce people to the basic differences to show how they are different and yet the same. As for the for loop counting from 1 to Lines.Count, the array I was accessing is zero-based. So, if I counted from 1 to lines.Count, I would need to then subtract one from index whenever I accessed the array. That is less efficient and it isn't a good comparison when the C# for was counting from zero. Again, I was trying to compare apples to apples. As far as My.Computer.FileSystem being "better", I again was comparing apples to apples. I firmly disagree with you but that's a personal preference and again, not the point of the video. When it comes to the question of why is case-sensitivity a good thing, it is because it allows us to name things more intelligently. A Person class holds information about a person. A person variable can be an instance of the Person class. The casing allows us to name them the same. We know it it is an object vs. a variable by how it is cased. At the end of the day, reality is what it is. You seem to enjoy VB.NET. That's great. However, the vast majority of .NET developers favor C# over VB.NET. Whether you agree with them or not is irrelevant. These are the two major .NET languages. Microsoft is now starting to favor one over the other because of the vast difference in demand. That was what the comparison was all about. Which .NET language should you choose. I didn't choose Java as the comparison because this isn't about Sun vs Microsoft. This is about which .NET language should you choose. It is a question I get a lot and now you have my answer. If you will note, I didn't say "don't ever develop in VB.NET". I said that it depends on the job market in your area, your preference, and what you feel comfortable with. However, if you want to look at it in general, C# has won and it isn't even close.