apps made using .net

hello there,
I have VS2010 and I had a question about developing apps using C# and vb.net
I was wondering if anything that can be coded in C# can be also coded in vb.net or not?
LVL 1
XK8ERAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wasiftoorCommented:
This is almost always true because both C# and VB.net because although both languages are compiled using their own individual compiles, the .NET Common Language Runtime (CLR) is responsible for converting the Common Immediate Language (CIL) to native machine code.

There are syntactical differences off course. Take a look at the following link to look at examples of common syntactical differences.

http://www.harding.edu/fmccown/vbnet_csharp_comparison.html
0
XK8ERAuthor Commented:
I understand and is it possible to write in C# everything that has been done using C++ prog language?
0
Chinmay PatelChief Technical NinjaCommented:
No :) C++ Goes way beyond C#. But yes Visual C++ is everything. Though C# has unsafe extensions to possibly do everything that can be done by C++, I have a strong feeling that VC++ wins hands down.

PS: I am a hardcore C# fan :)
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

SriVaddadiCommented:
Yes. It could be done.   VC++.net is close to C++.  There are 30+ (or even more by now) languages built  targeting .net framework.
0
shanejhCommented:
NO. C# can use external libraries to achieve everything you can do in C++ but C# is still managed language and therefore by itself has limitations. You could possibly write the same software but not with the same amount of optimisation.

Unmanaged C++ has more control over the way memory and devices are accessed meaning it can do more when it comes to lower level access to them. For example a 3d graphics developers would use native C++ over C# in fact they would use unmanaged C++ over managed C++.
0
Jacques Bourgeois (James Burger)PresidentCommented:
C++ uses pointers, enabling it to work directly with the computer memory, one of the main causes of instability and security problems in the 90's.

As most new languages that came after that, pointers are not available in C#. So even if the syntax is the same, most C++ code uses pointers that cannot be used in C#. If you see C++ code that has variables with an asterisk in their name, it cannot be converted directly to C#. Classes are often available in the framework to perform the same operations, but you would have some rewriting to do to use those instead of pointers.

As for VB and C#, the declarations (variables, if, for) need to be rewritten, and both languages use a different way of defining events, but you can usually copy and paste big portions of the code, because the real work is done by the framework classes, and both languages use the same classes. The only differences when you call methods or work with properties is that C# needs a ; at the end of each line while VB takes a carriage return, and array and collection indexes are between square brackets [ ] in C# while they are between parenthesis in VB ( ).
0
XK8ERAuthor Commented:
good information in here!
I have a lot of apps written in C, C++, C#, VB.net and some work on windows, mac and linux..
I have basic knowledge on them but I would like to specialize in one language of those 4 so i would like to know what do you guys recommend looking ahead into the future.
0
Jacques Bourgeois (James Burger)PresidentCommented:
If you work in a multiple OS environment, and unless you have to write applications that are very close to the system (drivers and the likes) or require a lot of performance (games, graphics), go for C#.

C is dead. It is not object oriented, and most programming nowadays that is not simple scripting is OO.

C++ is going away because of the problems I was talking about in the first line of my last post.

VB is Microsoft only and although you can write and compile VB programs in Windows that will work on other platform, testing and debugging is a pain because VB is not available on other platforms.

C# is an open language. There are compilers and editors provided by third parties for almost all the other operating systems out there.

And the guy who tells you to go for C# is a trainer specializing in VB, who likes VB more than he does C# (for a few reasons that have nothing to do with your question, so I won't start the war here).
0
XK8ERAuthor Commented:
okay so basically vb.net and c# should be top ones?
0
shanejhCommented:
Well it depends on what you want to do. C++ is still used a lot as it is supported on many platforms, Java is probably the most used Application programing language at the moment and it is also used for android phone dev. In terms of windows/MS development for business application development C# is definitely the most used language.

There is also Objective C which is used for OSX and iOS development.

If you are wanting to get into windows development and still have some sort of portability then C# isn't a bad language. Java isn't a bad option either.

The only other comment I would make is don't forget that software development is NOT about the language you use. The language is just a tool. A good developer will pick up languages very quickly and often they need too. A Software Architect normally has good knowledge of many languages.
0
shanejhCommented:
I think I'm pretty much agreeing with JamesBurger here. But it really depends on what you want to do. C# is a nice language and MS provides nice tools.

It's worth looking at the job market in your area just to to give you and idea of what people are looking for. I will be very surprised if it is not dominated by 4 areas. C# developers, ASP.Net in general, PHP and Java.

All of the above will be around for a long while to come.

Otherwise you might find this interesting:
http://langpop.com/
0
SriVaddadiCommented:
IMHO,  It is always good to have diversified knowledge and mastering in what you are doing or have done.  You need to exactly know "why" behind all  your design\implementation decisions.

 No one can say if C++ is better or C#. It entirely depends on a scenario. If something is better than the other then no two languages would have co-existed.

 Regardless of how, every problem could be solved in C#,C++. Both languages have their advantages and disadvantages based on a scenario.

 C++ - object oriented, procedure oriented (typically C)

 C# - Object Oriented,  declarative, event driven, metaprogramming (reflective , generic)
0
NavneetSoftware EngineerCommented:
Hi!

C# and VB.net are almost same and yes then are twins, So your answer is yes.
however when we compare C# with C++ then rememebre

C++ is a somewhat portable language. In theory at least, you can take your C++ code, compile it on a Mac, on Linux, on Windows, or Solaris, or ...on and on... And it will just work. In practice, it isn't nearly that simple, especially for GUI apps.
C# runs on Windows only, although a subset of it may run on Linux using Mono.

C# has "partial" classes, which allows a class to be defined in multiple files

C# does not allow function signatures; in other words, there is no such thing as what is done to create "#include" files for C++

So it's conflicting between the two to port.

Thanks!
0
Jacques Bourgeois (James Burger)PresidentCommented:
A lot of answers seem to indicate that C# runs on Windows only and that you need C++ to run in other environments. This is not the case. C# is portable. As I mentioned before, there are even editors and compilers for C# for most modern environments.

Although Microsoft does not provide multi-OS tools, they have developped the .NET framework (that you need to use with C#) to be portable, and many have jumped on the occasion. The most know multi-OS tools provider is the Mono project, under the tutelage of Novell (http://www.mono-project.com/Main_Page).

One point well put is that the language is not important, but as long as you choose one that fits well into the type of work you are doing and your own style of programming. There is even a COBOL.NET that, because it runs over the .NET framework, can do almost everything that VB and C# can do.

You also have to look into the not to distant future. The new Windows 8 environment looks like it could be the thing that brings back Microsoft in the game with it's Metro style applications. It will support only C++, C#, VB and JavaScript. So if you think that in one year from now you will be programming for Windows desktop, Windows tablets and Windows phone, your need to forget about some languages and concentrate on those (although JavaScript alone won't cut it).

The main thing is: what are you planning to do? What type of applications? On which OS(es)? On what type of hardware?

This typically dictates the best language for you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
angus_young_acdcCommented:
JamesBurger it is portable, yes, but there are still limitations which is why platforms such as Mono exist.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.