Solved

apps made using .net

Posted on 2012-04-02
15
470 Views
Last Modified: 2012-04-04
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?
0
Comment
Question by:XK8ER
  • 3
  • 3
  • 3
  • +5
15 Comments
 
LVL 9

Expert Comment

by:wasiftoor
ID: 37798940
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
 
LVL 1

Author Comment

by:XK8ER
ID: 37799005
I understand and is it possible to write in C# everything that has been done using C++ prog language?
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 37799238
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
 
LVL 16

Expert Comment

by:SriVaddadi
ID: 37799247
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
 
LVL 2

Expert Comment

by:shanejh
ID: 37799387
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
 
LVL 40
ID: 37799467
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
 
LVL 1

Author Comment

by:XK8ER
ID: 37799478
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 40
ID: 37799593
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
 
LVL 1

Author Comment

by:XK8ER
ID: 37799600
okay so basically vb.net and c# should be top ones?
0
 
LVL 2

Assisted Solution

by:shanejh
shanejh earned 200 total points
ID: 37799795
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
 
LVL 2

Assisted Solution

by:shanejh
shanejh earned 200 total points
ID: 37799845
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
 
LVL 16

Assisted Solution

by:SriVaddadi
SriVaddadi earned 100 total points
ID: 37800520
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
 
LVL 15

Assisted Solution

by:navneethegde
navneethegde earned 100 total points
ID: 37800713
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
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 100 total points
ID: 37801400
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
 
LVL 15

Expert Comment

by:angus_young_acdc
ID: 37805369
JamesBurger it is portable, yes, but there are still limitations which is why platforms such as Mono exist.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now