[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

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

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 VB.net 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#?


VWrestle97
0
VWrestle97
Asked:
VWrestle97
2 Solutions
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
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.

~IM
0
 
muzzy2003Commented:
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.
0
 
VWrestle97Author Commented:
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?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
VWrestle97Author Commented:
IM,

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

VWrestle97
0
 
BrianGEFF719Commented:
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.
0
 
VWrestle97Author Commented:
BrianGEFF719,

do you mean that I can combine C# classes with VB.net classes to make up one program?
0
 
silaupuraCommented:
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.
0
 
VWrestle97Author Commented:
silaupaura,

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?

VWrestle97
0
 
silaupuraCommented:
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
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now