.NET/C# or Java, Which would you choose?

Carl Sudholz
Carl Sudholz used Ask the Experts™

I'm having trouble deciding between learning .NET or Java.  What would you do if you were me?

I am at a crossroads in my software development career. I have been writing applications in MS Access and Excel, and now have the desire to move out of the office framework to develop self contained, distributable desktop applications. My apps will do much the same thing as in MS Office, but without the need for MS Office.

I am very proficient in VB6 (MS office 2003 development - Access and Excel).  At uni I did lots of Java(2) and a little C++.  So I'm familiar with both, although I have forgotten much of both.  That said, I expect I'll pick it up again quickly once I get back into it.  

My applications have the following traits:
- They are small and self contained (less than 100 objects typically)
- Often they will be data driven requiring connection to a DBMS (mySQL)
- Distributable as desktop applications (mobile and web development is not in my scope but will be in the future)
- My  clients are mostly (90%) MS Windows users, but it would be nice to have the applications work on Mac too.
- Be in an object orientated language
- Utilize open source code / applications / plugins etc
- Ideally, I would like to import / utilize code from my MS Office applications in my new applications.

I have narrowed the choice down to either Microsoft's .Net (C# / Visual C#) or Sun's Java platforms.  I am familiar with both, and they are both common and serve my purpose.  However, I'm not sure which to choose.  

So, if you where me,which language would you choose to develop your talents in and why?

Thank you.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Awarded 2011
Awarded 2011


If there is a possibility that you want to move beyond MS with your applications, then I believe java would be a better choice
as it is more general.
You will not be able  to utilize code form MS - this would probably be the only issue among your points which
would be a problem. There are still some good classes which will help you to read
and manipulate with some office files.
For other points Java should be OK.

kaufmedGlanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015

You will not be able  to utilize code form MS
Not entirely true. There is the Mono Project  : )
Carl SudholzManaging Director



I'm leaning towards the .Net framework (C# and Visual Basic .NET) because:
- My core client base is Windows OS (portability for me is a low priority).
- Visual Basic .Net means I need not learn a new syntax as I can achieve all I need to without do so.
- It appears the Microsoft tools (studio / studio express / SQL express) are more productivity (quick clicks / automated wizards etc) orientated (which suits me) than Java (productivity is a high priority)  
- .NET is more compatible with my existing knowledge and code in Visual Basic 6 (saving considerable rework)
- In terms of functionality there appears to be very little difference between .NET and Java (for me anyhow)

Here are a bunch of useful comparisons on the topic.

Extra thoughts are welcome.

Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Awarded 2011
Awarded 2011

If your priority is to turn out the apps more quickly then it is better to
stick to what you knoew better - no questions about it, especially
 if other platforms are not so essential to you.
I had the impression that you had also long-term goal to diversify your
skills and "develop your talents".
If the speed is big priority and you are proficient in VB6 - no question
.NET will be faster for you.
Top Expert 2015
Since most of your job is for Windows, choosing .NET over Java is an easy choice. .NET was designed to be multi-platform while favoring Windows, while Java was designed to be multi-platform without priority on any platform. It is thus a lot easier to program under Windows with .NET than with Java.

If you go the .NET route, there is still the question of language. VB or C#?

If you are coming from an Access / Excel background, Visual Basic .NET is the easiest one to learn for you. Although .NET is very different, you will at least be at ease with the syntax that is almost the same as the VBA used in VB6, Access and Excel. Moving your old code to the new environment would also be easier.

Personally, I find VB to be easier to code than C#, mostly because the Visual Studio editor for VB is a lot more convivial than the C#. I would easily put a 10 to 15% increase in productivity developing Windows application in VB than in C#. Even more if your background in VB is better than your background in C, C++ or Java.

However, there would be a hiccup in using VB.NET. Although .NET applications can be ported to other systems (if you are careful), VB itself is not supported under other platforms. That means that you have to write a VB application in Windows (Visual Studio), cross your fingers, and hope that it will work under the Mac or any other platform. If not, you are back to Windows to correct the problem.

On the other hand, there are C# editors and compilers on many other platforms, including the Mac. A quick Internet search for "Mono Novell" will get you started on the subject. You can develop the application in Visual Studio (Windows), but if there are problem on other platforms, you will usually be able to find open source code editors, compilers and debuggers to check for specific platforms problems. So C# is more interesting for multi-platform development than VB is.

Just be sure, if you go that route, to set your .NET application to compile to an older version of the framework. By default, Visual Studio 2010 targets version 4.0 of the framework. Alternative on other pplatforms are usually a few years behind and won't work with 4.0.
kaufmedGlanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015

mostly because the Visual Studio editor for VB is a lot more convivial than the C#
I find it to be about the same.

AFAIK, all of the VB6 functions have been ported into VB.NET, along with having the .NET-specific stuff available. This means that your learning curve will be really low to start off. I would suggest picking up the .NET-specific stuff up, though, because I would expect MS to drop the old VB6 style in future versions of VS. For the time being, you shouldn't have to focus much on the language itself to get up and running. Rather you can focus on learning how apps are deployed and how the newer XML configuration system words (over the old .ini system, although you can still use .ini if you really love it). You can also jump into web development if you like, since the upper-end versions of VS (and the targeted Express editions) allow you to use the same language you love (plus a little HTML) to quickly develop web applications.
Hi Carl,

Since you say that you have used both Java and VB, and you say that portability is not a concern, I'd suggest you move to .Net and go for C#.

There is no real difference between VB.net and C# with regard to what you can achieve, however, if you are familiar with Java, the C# syntax should not hinder you.

The reason I would suggest C# over VB is that VB.net allows users to code using the same practices adopted in VB6, VBA etc. That is to say, you can (almost) completely ignore the fact you are coding in an object oriented framework.

Picking up C# forces you to see the object oriented side of the .net framework (yes you can in VB too, but its not as "in your face"). In my experience, the use of C# results in code that is written better, because new users can't fall back on their bad practices as readily.

Best of luck, and be sure to try and stick to Microsoft's best practice for C# if you chose to go that route:

Navneet.Net Full Stack Developer


If you are going to work on windows OS, then definately go for Microsoft's .Net (C# / Visual C#)
Because you would save lot of unnecessary trouble and waste of resources trouble shooting Java on OS.
Top Expert 2015
A little comment on cjmurph idea that C# is more interesting to use than VB because if does not let you use the old VB6 and VBA practices.

Yes, as it comes out of the box, VB has been designed to ease the migration from VB6/VBA to VB.NET and to make it easier to use for an amateur. But it takes about 1 minute in the project properties to configure the environment so that VB.NET behave just like C# and becomes a professional language.

Remove the Imports for the Microsoft.VisualBasic namespace.
Set Option Strict On
Set Option Infer Off

And there you are. The old VB commands are not available anymore and the compiler starts nagging you and forces you to be careful with your code.

There are only 2 read important differences between VB and C#. The most important one is the portability of the C# code to other platforms. If you plan to have some of your .NET code run outside of Windows, C# is the way to go. Otherwise, you chose the one you feel more comfortable with.

Both languages have the same feature. After exchanging new stuff between each other on every version of Visual Studio. C# got anonymous types first, but had to wait for the 2010 version before it got the equivalent of VB's optional parameters. Microsoft get tired of that cat and mouse game and has officially announced, a little more than one year ago, that from now on, new features will appear in both languages at the same time.
Carl SudholzManaging Director


Thank you everybody.  .NET it is.  

I will begin with VB.net on and move into C# in the long run. This will manage my learning curve while still allowing me to output some useful stuff.

In the space of programming platforms, Microsoft certainally have come a long way in the past 10 years (since I was at uni).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial