Can you give me an example of how much easier VB is than C#?

Posted on 2004-11-23
Last Modified: 2010-05-02
I hear all the time that VB is easier than C#, but when I see the code... it basically looks the same.  I mean... don't you have to do the same amount of work.  

I want to build a windows form application that will calculate the inertial properties of different geometric shapes and display then in 3D.  How would using be a better choice than C# for this type of application?  I mean.... is there code that I can get done more easily with VB than with C#?

Question by:VWrestle97
    LVL 85

    Assisted Solution

    by:Mike Tomlinson
    Your right.  You do have to do the same amount of work, especially since your talking VB.Net vs. C#.  They share the .Net Framework and so for the 99% of things, there really isn't a difference.

    "Easier" is really just a matter of preference.  In my opinion, VB.Net is easier to read than C#, and therefore easier to code in.  Others may feel just the opposite...

    There are specific cases where it actually is easier.  If your integrating with MS Office, then VB.Net will look more like VBA and thus make it "easier" to jump back and forth between the VB.Net documentation and the VBA docs.  You will probably understand VBA better if you use VB.Net, thus making it easier to code.

    If your doing serious 3D manipulation, then most of the code you will find will be in either in C or C++.  In this case, it would probably be easier to use C# since it will look and behave similarly to those languages.

    Of course, all of this just really depends on your experience and comfort level with the syntax of those languages.  Programmers who know both languages well probably don't have any qualms with mixing the languages together.

    LVL 16

    Expert Comment

    The flip side of this is that if you also do some VBA, it is nice to keep some separation. Stick to C# for your .NET, and then you won't get the VBA and the VB.NET confused. There are arguments both ways.

    Author Comment

    great guys!

    You make me feel better about leaning toward C#!  
    I was also wondering if one language has more support than the other in terms of getting coding examples... or do they both have the same amount of coding examples?

    Author Comment


    I thought that C or C++ language (especially pointers) can be avoided if I use Direct3D with C# to do my 3D graphics?

    LVL 19

    Expert Comment

    the thing about .NET is the code can easily go back and forth between C# and VB.NET because its all based on the same framework.

    Author Comment


    do you mean that I can combine C# classes with classes to make up one program?
    LVL 1

    Accepted Solution

    No, U can not. But U can reference dll made in one language( say C#) in other and then after making object of the class in your project u can use all the public functions of that dll.

    Author Comment


    I am sorry that I never really new what a dll is.  How is a dll generated and How would you access the dll so that I can reference it in another program?

    LVL 1

    Expert Comment

    OK, so let me start like that

    say u are using C#.NET.

    1. go to explorer bar, right click references and click 'add reference'

    2. All the available dll (Dynamic Link Libraries) will be listed there.

    3. Select any one of dll and click ok.

    4. Now in the class where u want to use the functions of that dll, import it by writing following line :

    using <dll_name>

    which is just like:

    using System.Windows.Forms.Forms because these are also dlls.

    now for using functions of the dll :
    make instance of class like

    dll_name_that_u_added.className  clsObj = new dll_name_that_u_added.className()

    clsObj.functionName( parameters)

    that's it.

    NOTE: here dll_that_u_added may be written in VB.NET, C#.NET or VC++.NET

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now