简体   繁体   中英

Android to WP7 absolute newbie question: C# or VB?

I'm going to migrate my Android application into WP7 platform. Android one contains heavy enough calculation stuff (encryption/decryption), plus extensive usage of DB (SQLite) and some graphics (simple) and I'm trying to figure which language to select: either C# or VB

I have some experience both in C# and VB.net, but can't decide which one to select, any clues?

I would recommend C#, based on a couple of factors:

  1. I assume the Android application is written in Java. Between C# and VB, C# is the most similar.

  2. If you are doing lots of calculations, C#'s more terse syntax will probably make the code easier to read. VB is more verbose and thus tends to produce more clutter.

  3. Since you are new to the platform, you will definitely find a lot more resources with C# code examples than with VB.

There are no technical benefits or drawbacks to choosing either language; the complete set of APIs and platform features are available to you whether you choose C# or VB.NET, so it comes down to whichever you are most comfortable with or want to spend more time with.

The only thing that might sway it one way or another is that (in my opinion) there are more samples, blog posts, and general help written in C# than VB.NET, but that's about the only differentiator I can think of.

I went from VB.net to C# and wouldn't ever go back through my own choice!

Aside from the technical differences ( see here for just one comparison ), it's my personal opinion that C# is more readable, fluent and just plain better.

Do a search on google for heaps of comparisons on why one is better than the other. At the end of the day it's your personal preference... try both and see which you prefer.

If you aren't particularly familiar with either then definitely use C#. By far and way the vast majority of code you will come across in the Web and in books on Silverlight will be written C#.

I'd go with C#, it's a far more popular language. Furthermore, Java to C# is an easier transition.

Edit: Popularity of a language make's it easier to find information and perhaps more importantly, quality developers.

选择您更喜欢的语言。

I would suggest c# because it's more similar to java. So maybe you will manage to save code structure.

C# for sure. C# is a lot more alike Java, and syntax alike much more compatible.
Next to that C# is more popular so more resources for it, and because of the extra time they spend on C# the compiler slightly generates higher performance MSIL.

If you know Java you'll find C# very comfortable to transition to and work with, especially if you're having to maintain older Java code as well as working on the new project. I've worked in situations where I had to work with VB6, VB.NET and C# code within the course of a day and it can be tricky to remember not to use or to use semi-colons or that the variable type goes first or last.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM