C#, VB or?

SamJHannan

New member
Sep 27, 2014
305
0
0
Visit site
I'm getting started developing a revision app for WP8.1. I have good knowledge of VB and some knowledge of C#, is there any advantage to using C# over VB?
 

drachen23

New member
Nov 5, 2011
86
0
0
Visit site
The main advantage is that there are many more code samples, example solutions and blog posts available in C# than VB. Otherwise, the two languages are almost identical feature-by-feature. Use what you like.
 

DavstarApps

New member
Apr 11, 2013
11
0
0
Visit site
There are a few differences between them (VB having properties that can take parameters comes to mind), but the discrepancy is not really enough to limit what you can do with it. As drachen23 mentioned, you will find more sample code out there in C#, but it comes down to which one you will be more comfortable with. The nice thing is, if you find a nice class library written in VB, you can use it in your C# project and vice versa.

There are also some code converters online that will translate one to the other, so you can run sample code you find through that and it will get you pretty close in most cases.
 

Ben Adams

New member
Sep 14, 2014
10
0
0
Visit site
I'd go C# if you are comfortable enough with it, mainly as its the first release for tools (e.g. .NET Native is only available for C# atm); though equally you should consider Javascript+HTML as the ?
 

Ron Gramann

New member
Nov 27, 2012
51
0
0
Visit site
I cut my teeth on VB, but switched over to C# about 10 years ago. Never looked back nor touched VB since. Ultimately it is a personal preference. You may also consider the job market, more C# on offer than VB.
 

EvilMM

New member
Apr 19, 2013
16
0
0
Visit site
C# is more logical to me.
Besides the fact, that C# is the language written for .NET, VB nearly does not use symbols.

Let's look at this snippet in VB:

Code:
Public Function test(max as Integer)
  For i As Integer = 0 To max - 1
    'Do something
  Next
End Function

Same in C#

Code:
public void test(int max)
{
  for (int i=0; i<max; i++)
  {
    // Do something
  }
}

For me, C# is more readable than VB and that makes it easer to develop for.
But thats not all. VB is not as type safely as C#.

It is possible to write code like this:

Code:
Dim X As Object
Dim y As MyOwnType = new MyOwnType()

x = y

Why no implicit typecast is needed?
Many concepts are implemented as a scripting language.

It's not only the syntax.
 

Travis Liew

New member
Nov 14, 2012
13
0
0
Visit site
I started out on VB, switched over to C# a little while later and haven't looked back. As the others have stated though, it's all up to personal preference.
 

Glenn Ruysschaert

New member
Jan 26, 2014
74
0
0
Visit site
I started in VB as well. It's a very friendly language as you almost literally type what you are doing, it's definitely good to learn the basics of programming.
You very clearly see what is going on in your code, and teaches you quickly how to code. But I also switched to c# later on, because as mentioned it's more widely used and you'll find more documentation. C# is also more similar to other programming languages as javascript.
If you're a quick learner and can think logically well then you can just start with c#, if you rather take it slow I recommend VB and then switch to c# once you're comfortable with the flow of coding.
 

Ptur

New member
Feb 19, 2015
15
0
0
Visit site
C#, i developing on both languages. Start int .net on VB, but C# stay more actualy, 90% .net applications on C#
 

Pete

Retired Moderator
Nov 12, 2012
4,593
1
0
Visit site
The other puller toward C# is the amount of developers using it thise days (not just app developers). So, if you want to know how to do something in code, you can just Bing for "C# how to <whatever>" and you'll more than likely end up with a StackOverflow article with a bunch of suggestions.

Significantly less people on the internet ask for help with VB than C#
 

SamJHannan

New member
Sep 27, 2014
305
0
0
Visit site
Interested to read all the replies. I started off in C#, had no clue what I was doing to be quite honest, switched back to VB which I'm much more comfortable with, only to find much of the code I already knew in VB didn't function correctly when developing for WP8.1. I then decided to give learning C# a real go, and haven't looked back. You're right, the amount of resources available online is what makes the difference, there is very very little about developing for WP in visual basic, even on dedicated VB forums.
 

LatApps

New member
Jan 6, 2015
5
0
0
Visit site
Previously I had experience only with HTML/CSS/JS apps, but they did not support MapControl, so I had to learn how to create WP apps in other language. I chose C# instead of VB or C++ (Although I have had experience only with C++ before this) and definitely was the right choice!
 

zigah

New member
Aug 11, 2011
12
0
0
dawnofplay.com
+1 for C# here. For all the reasons already mentioned above, but above all, it is much more practical to learn C#, given the similarity to other languages, mostly for the number of sample code available and the number of existing projects and (potential) colleagues that are already all C#.
 

Members online

Forum statistics

Threads
326,650
Messages
2,248,703
Members
428,530
Latest member
Phoquer