C++ in .NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have been reading up on multiple aspects of .NET but I have a question for
the group. All of the examples I have seen regarding the use of .NET have
been either C# or VB. Seeing this makes me worry that C++ is not being shown
because it does not work well. Does anyone out there have any experience
using C++ in .NET? Are there enogh perks to make the learning curve worth it
to use C++ in .NET?

Thanks,
Chris.
 
Hi there...

C++ in .NET works OK. There's a book Programming with Managed Extensions for
Microsoft Visual C++ .NET / Richard Grimes. The author explains quite well
how to move into managed .net. Managed C++ I've been using it for a while
;-) it's cool! I recommend u that book...

Regards,
 
Chris Haidvogel said:
Hi all,

I have been reading up on multiple aspects of .NET but I have a question
for
the group. All of the examples I have seen regarding the use of .NET have
been either C# or VB. Seeing this makes me worry that C++ is not being
shown
because it does not work well. Does anyone out there have any experience
using C++ in .NET? Are there enogh perks to make the learning curve worth
it
to use C++ in .NET?

It depends on what you mean with "does not work so well": managed C++ works
fine, you can do pretty much everything with it; However it has (IMO) 2
major drawbacks:
- It lacks a lot the syntactic sugar C# has (e.g. for events, properties,
foreach, lock...)
- It needs lots of cryptic keywords (like __gc, __value...)

This is of course especially bad for sample programs...

Personally, I would only recommend using MC++ for porting legacy code.

Niki
 
Chris Haidvogel said:
Hi all,

I have been reading up on multiple aspects of .NET but I have a
question for
the group. All of the examples I have seen regarding the use
of .NET have
been either C# or VB. Seeing this makes me worry that C++ is
not being shown
because it does not work well. Does anyone out there have any
experience
using C++ in .NET? Are there enogh perks to make the learning
curve worth it
to use C++ in .NET?

Managed C++ works fine. I'm not sure why all you see is C# &
VB.NET. However, there are
even more options out there like Borland Delphi 8 that will work
with .NET as well.

My personal preference is to use C# for .NET coding, and avoid
Managed C++ because I
am worried that I would find it confusing trying to write
non-Managed C++ code(of which I need
to write quite a bit) if I got too familiar with managed C++.

Andrew Faust
 
I completely support this endorsement. Richard is without a doubt one the
best C++ developers around and his knowledge of .NET in relation to it is
second to none. For the forty or so sheckels it costs to buy the book ti
would certainly be money well spent.

The reason most of the examples are in C# or vb.net is likely because thats
what most developers have chosent to adopt it. I myself find it a lot
faster to develop in C# than I do in managed C++ . Its not that C++.NET is
less effective.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
Niki Estner said:
It depends on what you mean with "does not work so well": managed C++
works fine, you can do pretty much everything with it; However it has
(IMO) 2 major drawbacks:
- It lacks a lot the syntactic sugar C# has (e.g. for events, properties,
foreach, lock...)
- It needs lots of cryptic keywords (like __gc, __value...)

Thankfully the new Managed C++ syntax fixes alot of that, infact I think the
properties syntax is a bit nicer in some ways. It still doesn't match C# in
terms of simplicity and ease, but it certainly is *ALOT* better than the
__gc style language.
 
Back
Top