tags:

views:

469

answers:

2

There have been substantial features and improvements in C# with each new release of the .NET framework, and in the upgrade from .NET1.0 to .NET2.0, Managed C++ was replaced with C++/CLI, which was a great improvement.

Have there been any improvements in C++/CLI since .NET2.0?

+1  A: 

VC++ 2008 did not add much for C++/CLI. However, 2010 is going to add a lot of new features. You can see the improvements in VC++ 2010 here.

One major improvement in the 2010 beta is the addition of Lambda Expressions.

RValue referencing via && looks promising (if a bit confusing at times), and the auto keyword looks like it'll simplify quite a few things. It's pretty much the C++ version of C#'s var keyword, which really simplifies using .NET collections.

The other additions are decltype and static_assert, both of which look helpful.

Reed Copsey
I'm interested in C++/CLI-specific features, rather than the C++0x features in VS2010.
James Hopkin
There are no new C++/CLI specific features. However, lambda's and auto work with C++/CLI as well as native code, so they are still valid.C++/CLI, at its core, is unchanged since VS2005. It's also still using the the same CLR (2.0 - which is the basis of .NET 3.5), so there are no fundimental language changes.
Reed Copsey
When you say 2010's C++/CLI is "using" CLR 2.0 do you mean it doesn't compile using features specific to 4.0? ie: it "targets" 4.0 using 2.0-compatible instructions.
Andy Dent
+2  A: 

Be warned: Visual Studio 2010 no longer supports Intellisense for C++/CLI.

"While the lack of Intellisense for C++/CLI is unfortunate, we expect that it only represents a small portion of your source code that you don't need to edit nearly as often as the native code."

RichieHindle
OUch. So much for Herb Sutter pushing C++/CLI as a first-class language for .NET. Thanks for the info.
James Hopkin
Yeah, I've only been trialling it for a few days and it is galling to realise how much I was relying on Intellisense. We have a huge codebase in C++/CLI and this will stop us migrating to VS2010.
Andy Dent