473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

C# vs. C++

Hello

I am intending to upgrade to either C++.NET or C#.NET but
I need some guidance. I have a fair amount of experience
with VB6 and a little with Visual C++ 6.

My interest is mainly in industrial control applications.
I'm not really interested in database applications, web
development, etc.

In particular, the following questions come to mind:

1) How do C++.NET and C#.NET compare in terms of ease of
use and learning curve? My VB knowledge is fairly good, my
Visual C++ 6 is a little rusty.

2) Are things like serial communications more easily
achieved in one language than the other? I seem to recall,
for example, that I had to hunt around for a third party
serial port class for use with Visual C++ 6. Something
like VB's MSComm control would be great.

3) Is there any difference in the efficiency / speed of
the executables generated by each platform?

4) Is muti-threading easier to achieve in either language?

Thanks for reading this far - I'd be very grateful for any
opinions that you might have to offer.

Stuart Willcocks
Nov 15 '05 #1
4 1836
Stuart,

please see remarks/comments inline

"Stuart Willcocks" <an*******@discussions.microsoft.com> wrote in message
news:13*****************************@phx.gbl...
Hello

I am intending to upgrade to either C++.NET or C#.NET but
I need some guidance. I have a fair amount of experience
with VB6 and a little with Visual C++ 6.

My interest is mainly in industrial control applications.
I'm not really interested in database applications, web
development, etc.

In particular, the following questions come to mind:

1) How do C++.NET and C#.NET compare in terms of ease of
use and learning curve? My VB knowledge is fairly good, my
Visual C++ 6 is a little rusty.

Managed code using VC++ is dramatically different from MFC and Win32 API
VC++ programming. All of the things that you may have come to know and love
in classic VC++ are gone in MC++, or at best they work so different as to
not be recognizable. I've been programming in VC++ for the past 6 years,
and in C++ since the mid '80s, and a year or so ago took up the .Net
approach. The biggest problem for me with MC++ was forgetting that pointers
(and therefore arrays) operate very differently. C# for me was a lot easier
because it was a new language, ergo something that I would have to learn
(contrasted with MC++ as something that I would have to forget). That will
change significantly with Whidbey, but for now VC++ and MC++ have three
characters in common in the name - but the similarities are hard to find
beyond that.
2) Are things like serial communications more easily
achieved in one language than the other? I seem to recall,
for example, that I had to hunt around for a third party
serial port class for use with Visual C++ 6. Something
like VB's MSComm control would be great.

no difference there --
3) Is there any difference in the efficiency / speed of
the executables generated by each platform?

Don't know about that one -- we tend to get way more excited about developer
productivity, network bandwidth availability, and product stability. Most
of our apps are desktop user apps, and server apps that provide interfaces
to backend databases - raw speed at the desktop is not too critical,
especially if you have a user pondering information on the screen (VC++
waits on the user at pretty much the same speed as does C#). We like the
feature of language independent projects these days -- let the developer
choose what language to use for the task at hand. C# seems to win more
times than not (we do only C# and MC++, no VB)
4) Is muti-threading easier to achieve in either language?

Both langages support multithreading quite nicely in .Net - it is not quite
the same as CRT functions such as _beginthread and so on in classic VC++,
but, still quite functional.
Thanks for reading this far - I'd be very grateful for any
opinions that you might have to offer.


Pick the one you are most comfortable with. there seems to 100x more
literature, notes, support, and instructional info for C# than for MC++.
That may change in time, but for now it seems that C# is the favorite at
Microsoft, with the publishing community, and with developers.

roy fine

Nov 15 '05 #2

"Stuart Willcocks" <an*******@discussions.microsoft.com> wrote in message
news:13*****************************@phx.gbl...
Hello

I am intending to upgrade to either C++.NET or C#.NET but
I need some guidance. I have a fair amount of experience
with VB6 and a little with Visual C++ 6.

My interest is mainly in industrial control applications.
I'm not really interested in database applications, web
development, etc.

In particular, the following questions come to mind:

1) How do C++.NET and C#.NET compare in terms of ease of
use and learning curve? My VB knowledge is fairly good, my
Visual C++ 6 is a little rusty.
C#, like Java, is intended to "clean up" the language and make it
approachable and more abstract than C++. Both C# and Java succeed in this
endeavor, so C# is definitely easier.
2) Are things like serial communications more easily
achieved in one language than the other? I seem to recall,
for example, that I had to hunt around for a third party
serial port class for use with Visual C++ 6. Something
like VB's MSComm control would be great.
In terms of componentization, the effort is the same between Managed C++ and
C#, although with C++ (any version) you're still mucking with the language a
bit more than in C#. You can still use MSComm in C#, by the way, although
most people, I have been told, hate it. There are third party serial port
components written in C# out there, though, and I think one might be
available for free.
3) Is there any difference in the efficiency / speed of
the executables generated by each platform?
C# is going to be slightly slower, particularly with object creation and
pre-JITting. If you are using an unmanaged component that does the bulk of
the work (like the new Managed DirectX 9.0 libraries, etc.) then this isn't
too much of an issue.
4) Is muti-threading easier to achieve in either language?


It is the same between Managed C++ and C#.

HTH,
Jon
Nov 15 '05 #3
-----Original Message-----
Stuart,

please see remarks/comments inline

"Stuart Willcocks" <an*******@discussions.microsoft.com> wrote in messagenews:13*****************************@phx.gbl...
Hello

I am intending to upgrade to either C++.NET or C#.NET but I need some guidance. I have a fair amount of experience with VB6 and a little with Visual C++ 6.

My interest is mainly in industrial control applications. I'm not really interested in database applications, web
development, etc.

In particular, the following questions come to mind:

1) How do C++.NET and C#.NET compare in terms of ease of use and learning curve? My VB knowledge is fairly good, my Visual C++ 6 is a little rusty.

Managed code using VC++ is dramatically different from

MFC and Win32 APIVC++ programming. All of the things that you may have come to know and lovein classic VC++ are gone in MC++, or at best they work so different as tonot be recognizable. I've been programming in VC++ for the past 6 years,and in C++ since the mid '80s, and a year or so ago took up the .Netapproach. The biggest problem for me with MC++ was forgetting that pointers(and therefore arrays) operate very differently. C# for me was a lot easierbecause it was a new language, ergo something that I would have to learn(contrasted with MC++ as something that I would have to forget). That willchange significantly with Whidbey, but for now VC++ and MC++ have threecharacters in common in the name - but the similarities are hard to findbeyond that.
2) Are things like serial communications more easily
achieved in one language than the other? I seem to recall, for example, that I had to hunt around for a third party serial port class for use with Visual C++ 6. Something
like VB's MSComm control would be great.

no difference there --
3) Is there any difference in the efficiency / speed of
the executables generated by each platform?


Don't know about that one -- we tend to get way more

excited about developerproductivity, network bandwidth availability, and product stability. Mostof our apps are desktop user apps, and server apps that provide interfacesto backend databases - raw speed at the desktop is not too critical,especially if you have a user pondering information on the screen (VC++waits on the user at pretty much the same speed as does C#). We like thefeature of language independent projects these days -- let the developerchoose what language to use for the task at hand. C# seems to win moretimes than not (we do only C# and MC++, no VB)
4) Is muti-threading easier to achieve in either language?
Both langages support multithreading quite nicely

in .Net - it is not quitethe same as CRT functions such as _beginthread and so on in classic VC++,but, still quite functional.
Thanks for reading this far - I'd be very grateful for any opinions that you might have to offer.

Pick the one you are most comfortable with. there seems

to 100x moreliterature, notes, support, and instructional info for C# than for MC++.That may change in time, but for now it seems that C# is the favorite atMicrosoft, with the publishing community, and with developers.
roy fine


At the same time, developers have a choice of using VC++
or MC++ in .NET, right? E.g., if someone writes all of
their code w/o using managed extensions in VC++ .NET, it
will be all machine language, just like pre-.NET code. Am
i right?

P.S. On a side note, VC++ code that uses some managed
extensions is mostly machine language, and only the
managed parts of the code are decompilable?

Thanks,
rs.
Nov 15 '05 #4
You can write code in VC.NET that doesn't use
managedness, i.e. the .NET framework, but it's
technically more or less the same as writing it in VC6,
you just get a different IDE with its outlining, etc.
(Am I right?)

-----Original Message-----
-----Original Message-----
Stuart,

please see remarks/comments inline

"Stuart Willcocks" <an*******@discussions.microsoft.com>
wrote in message
news:13*****************************@phx.gbl.. .
Hello

I am intending to upgrade to either C++.NET or C#.NET
but I need some guidance. I have a fair amount ofexperience with VB6 and a little with Visual C++ 6.

My interest is mainly in industrial controlapplications. I'm not really interested in database applications, web development, etc.

In particular, the following questions come to mind:

1) How do C++.NET and C#.NET compare in terms of easeof use and learning curve? My VB knowledge is fairlygood, my Visual C++ 6 is a little rusty.


Managed code using VC++ is dramatically different from

MFC and Win32 API
VC++ programming. All of the things that you may have

come to know and love
in classic VC++ are gone in MC++, or at best they work

so different as to
not be recognizable. I've been programming in VC++ for

the past 6 years,
and in C++ since the mid '80s, and a year or so ago tookup the .Net
approach. The biggest problem for me with MC++ wasforgetting that pointers
(and therefore arrays) operate very differently. C#

forme was a lot easier
because it was a new language, ergo something that Iwould have to learn
(contrasted with MC++ as something that I would have to

forget). That will
change significantly with Whidbey, but for now VC++

andMC++ have three
characters in common in the name - but the similaritiesare hard to find
beyond that.
2) Are things like serial communications more easily
achieved in one language than the other? I seem to

recall, for example, that I had to hunt around for a thirdparty serial port class for use with Visual C++ 6. Something
like VB's MSComm control would be great.


no difference there --
3) Is there any difference in the efficiency / speed of the executables generated by each platform?


Don't know about that one -- we tend to get way more

excited about developer
productivity, network bandwidth availability, and

product stability. Most
of our apps are desktop user apps, and server apps that

provide interfaces
to backend databases - raw speed at the desktop is not

too critical,
especially if you have a user pondering information on

the screen (VC++
waits on the user at pretty much the same speed as does

C#). We like the
feature of language independent projects these days --

let the developer
choose what language to use for the task at hand. C#

seems to win more
times than not (we do only C# and MC++, no VB)
4) Is muti-threading easier to achieve in eitherlanguage?


Both langages support multithreading quite nicely

in .Net - it is not quite
the same as CRT functions such as _beginthread and so onin classic VC++,
but, still quite functional.
Thanks for reading this far - I'd be very grateful
forany opinions that you might have to offer.

Pick the one you are most comfortable with. there

seemsto 100x more
literature, notes, support, and instructional info forC# than for MC++.
That may change in time, but for now it seems that C#

isthe favorite at
Microsoft, with the publishing community, and withdevelopers.

roy fine


At the same time, developers have a choice of using VC++
or MC++ in .NET, right? E.g., if someone writes all of
their code w/o using managed extensions in VC++ .NET, it
will be all machine language, just like pre-.NET code.

Ami right?

P.S. On a side note, VC++ code that uses some managed
extensions is mostly machine language, and only the
managed parts of the code are decompilable?

Thanks,
rs.
.

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.