Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello there, I am back to programming world lately.

Previously I used to program in Visual Basic of which I have good command. Later I became busy with non-development work and was not in touch with developments in development field. Now I see that VB is not used to that extent. Now I feel there is a need to choose another lang, but which one is the question?
FYI, I am talking about programing for general activities e.g. transliteration tools; general graphics programs; general file handling and so on, with good user interface. (all this is possible with VB, plz suggest a similar language).
Posted
Updated 14-Mar-12 0:44am
v2

It really depends on what you know, and what you want to do with it.

If you know VB at or before V6, then you will have a large amount to learn to move to later versions (VB under .NET) as the framework is enormous! Easy to use, but enormous...

VB for the .NET framework works well, and it in common use, but there is a fair amount of prejudice against it - C# is also in good usage.

If you want to do this for a hobby, then I would suggest download a free copy of Visual Studio 2010 for C# from Microsoft, and get a book and follow it. The main reason is that if you are moving from a pre-net VB to C# then you don't try to take the baggage of non-.NET VB with you!
If you want to do this for work, then you need to look at your local job market and see what is being recruited. Than make your decisions from there.


After your suggestion, I have checked for C# code. I feel it is nearer to C++ code. Actually, I have done some programming in C++, and much more in C.

Having said that, i want to ask...,
1. Do you mean that VB DOT NET is so much different from VB 6 that a VB-6-knower should go for a new language like C# rather than VB DOT NET. (Actually, your this sentence "The main reason is that if you are moving from a pre-net VB to C# then you don't try to take the baggage of non-.NET VB with you!" was not clear to me).
2. I would also like to know what are prejudices against VB DOT NET as mentioned above by you, and how C# bypasses them, if applicable.
3. Also if you are talking about c# with dot net framework, then does your stmt still holds that you will have a large amount to learn since framework is enormous, OR there is some relief in C#'s case as compared to VB DOT NET.
4. Please also tell me whether a program written for DOT NET framework has all similar properties after compilation irrespective of which programming lang was used OR its some properties still depend upon language used.
5. What is the advantage of C# DOT NET over VC++ in terms of usability, and what is the basic difference between the two, since I see both are based on C++ and both are Microsoft's versions?
Thanks and Regards.



0) C# is closer to C++ than to VB in many ways - and that is generally seen as a good thing, because it includes things like strong typing. However, it is a much simpler version (most of the time) with a clean syntax. I wouldn't argue that it is as powerful as C++ (it isn't) but it is a lot easier to remember (because there is a lot less of it) and (generally speaking) less prone to memory problems. If you know C, then you can think of it as C on steroids with all the pointers hidden! :laugh:

1) Pretty much all the things you could do in VB6 wyou can still do in VB .NET - which is a bad thing because largely the .NET framework provides alternatives which are better for reliability. If you are used to VB6, then the automatic reaction is to use the older constructs. Which means that horrible stuff like ON ERROR still work, but ignores the much, much more helpful exception handling that is built in to .NET

2) There is a view that VB is a "kids language" and that only childish programmers use it. That being made to work on VB projects is a form of corporate punishment. It's not entirely correct - VB.NET has been described as "C# without the curly brackets" - but there is an element of truth there, because VB.NET is based on a language that is nearly 50 years old, and has been twisted so often that it does creak a bit. In comparison, C# was designed from scratch about ten years ago to be a fully object oriented language, with the .NET framework very solidly in mind.

3) Sorry, but yes. C# and VB.NET both use the same framework, and it is absolutely huge! You said you have done some C++ - did you use the Microsoft Foundation Classes? Because they were big. But tiny in comparison! Surprisingly, that is also one of .NETs strengths - there is a huge library of easily available code to handle all the boring stuff. You need a lnked list?
C#
List<string> myList = new List<string>();

VB
Dim myList As New List(Of String)()
Done - now move on to use it, rather than worry about the mechanics of setting up the pointers and testing the links. Need a stack now? Same thing, but with Stack instead of List. Queue? Button? Serial Port? Progress bar? Database? (Actually that last one is a lie - you need at least three lines to do anything useful with a database, not just one)
It's is huge - but it';s also very, very handy - and the Intellisense built into Visual Studio helps you with it, so you actually have to remember less than you did with MFC. And (pretty much) it's consistent. The same operations work the same on different objects.

4) All .NET languages compile to the same code. Even COBOL.NET exists (why, I cannot say) and all modules written with any .NET language can be used seamlessly within any other .NET language. That means that you can write the Presentation layer in VB, the Business layer in C++ and the Data access layer in COBOL and it will all work together. You cannot tell which language was used before compilation.

5) C# is not based on C++. Or C. It looks like it, a lot, but it isn't at all the same. In C# everything (and I mean everything) is an object, with properties, and methods and events, and so forth. This includes integers, characters, and Sql Databases! C# makes it difficult to use true pointers - you have to declare the block of code that uses them as "unsafe" before it will let you. And load of other little differences. C# is .NET - C++ can be .NET or Native code. The later is faster to execute, but you lose the .NET libraries.
 
Share this answer
 
v2
Comments
Navaagat 14-Mar-12 7:05am    
Thanks a lot for reply. Yes, i want to use it for hobby. And also u r right, i used to program in vb 6 (or prior). But now i am afraid of a new language getting obsolete (later). B/c previously i developed several useful progs in vb which cannot run on windows now (and if somehow run, i don't have VB IDE for their improvemement as VB.NET is there). Now u can understand, i want to have my progs more stably preserved. So can i be assured that C# will not get drastically changed, once i start programming in that? OR is java a better option (with some libraries of course).
I mean which can be a language more robust and Classical type (i.e. virtually stable for future), with general purpose abilities as i mentioned above? (I can move to C# if it is like that).
OriginalGriff 14-Mar-12 7:25am    
Then I would go with C#. The .NET framework shows no signs of disappearing, and it doesn't nag you to update it all the time (unlike the Java runtime) :laugh: The development tools are good too - and the express version is free.

You can't guarantee that a language will be around in twenty minutes in this business - but neither C# or Java show and signs of dying soon so either would be a good choice.
Navaagat 14-Mar-12 14:53pm    
After your suggestion, I have checked for C# code. I feel it is nearer to C++ code. Actually, I have done some programming in C++, and much more in C.

Having said that, i want to ask...,
1. Do you mean that VB DOT NET is so much different from VB 6 that a VB-6-knower should go for a new language like C# rather than VB DOT NET. (Actually, your this sentence "The main reason is that if you are moving from a pre-net VB to C# then you don't try to take the baggage of non-.NET VB with you!" was not clear to me).
2. I would also like to know what are prejudices against VB DOT NET as mentioned above by you, and how C# bypasses them, if applicable.
3. Also if you are talking about c# with dot net framework, then does your stmt still holds that you will have a large amount to learn since framework is enormous, OR there is some relief in C#'s case as compared to VB DOT NET.
4. Please also tell me whether a program written for DOT NET framework has all similar properties after compilation irrespective of which programming lang was used OR its some properties still depend upon language used.
5. What is the advantage of C# DOT NET over VC++ in terms of usability, and what is the basic difference between the two, since I see both are based on C++ and both are Microsoft's versions?
Thanks and Regards.
OriginalGriff 14-Mar-12 15:42pm    
Answer updated - it was getting way too long for a comment! :laugh:
Nelek 14-Mar-12 17:05pm    
Very nice answer. My 5
The one that allows you to collect a paycheck.

Philosophy and adherence to archaic belief systems aside, there really are no other considerations...
 
Share this answer
 
Comments
[no name] 19-Apr-12 4:48am    
I agree!! 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900