I've been learning the .NET framework in vC++ for a while and I'm thinking of going to C#.
I'd like to here the opinions of others who have experience with both.
Thanks.
I've been learning the .NET framework in vC++ for a while and I'm thinking of going to C#.
I'd like to here the opinions of others who have experience with both.
Thanks.
Short practical summary: moving from vC++.NET to C# is often the right choice for application-level work (UI, web, services) because it raises productivity and reduces common memory-safety bugs, while native C++ still makes sense for low-level, performance-sensitive, or existing large native codebases. This expands on observations from , and and answers performance cautions raised by , and .
Why C# helps: it is a higher-level managed language with garbage collection, a consistent runtime model, and language features (properties, delegates/events, generics, lambdas, reflection) that cut boilerplate. Visual Studio tooling, designers and the NuGet ecosystem speed development and maintenance. For business logic, UI glue, web endpoints and Office automation the managed model typically shortens development and reduces interop complexity.
When to keep native C++: use it for deterministic RAII-based resource control, very tight latency or throughput hotspots, device drivers or code that must interoperate with existing C++ libraries. A hybrid approach is usually best: keep compute-bound/native parts in C++ and expose a minimal managed surface. C++/CLI is the cleanest way to wrap C++ libraries for C#, while P/Invoke is simple for plain C exports. C# also provides low-level options (unsafe code, stackalloc/Span, hardware intrinsics) that can narrow gaps but require careful testing.
Practical migration checklist (short): profile and identify hotspots, write unit tests, wrap native libraries with thin C++/CLI shims or export C APIs for P/Invoke, migrate high‑level layers to C# first, then measure. Example patterns:
using System.Runtime.InteropServices;
[DllImport("native.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int FastCompute(int x); C++/CLI wrapper skeleton:
public ref class NativeWrapper {
public:
static int FastComputeManaged(int x) { return native::FastCompute(x); }
}; Profile-driven decisions and keeping tests in place reconcile the productivity gains noted earlier with the valid performance concerns in this thread.
Jump to Post— Member #33065For Windows forms and Office integration, C# is a lot easier to develop in.
But of course, that's just my opinion.
Andy
Jump to Post— Iron_Cross 32C# is also supported by more things. Such as language specific tasks, and ASP.NET. Where as C++.NET isn't.
Not to mention the easy at which you can develope with C#.
Jump to Post— jbennet 1,618c# is basically all the excellent parts if c++ with the ease of use of visual basic
For Windows forms and Office integration, C# is a lot easier to develop in.
But of course, that's just my opinion.
Andy
Thanks for your reply, I have since tried both and I agree with your opinion, for most of the things I do C# is easier and just as 'powerful'.
C# is also supported by more things. Such as language specific tasks, and ASP.NET. Where as C++.NET isn't.
Not to mention the easy at which you can develope with C#.
c# is basically all the excellent parts if c++ with the ease of use of visual basic
I got a c# book called c# in easy steps for under £20 its Really noob though except at the end it does ADO and GDI graphics
C# is also supported by more things. Such as language specific tasks, and ASP.NET. Where as C++.NET isn't.
Not to mention the easy at which you can develope with C#.
But the power of VC++ is still unbeatable by C#. Am I correct? Since VC++ is unmanaged whereas C# is managed. VB and VC# programs run in the same style. VC++ is twice faster in accessing memory objects, arithmetic operations and database access.
But, I didn't tried with unsafe code in C#. Some of my friends are telling that unsafe code in C# will do better (but do it with careful).
Ganesh
for some performance issues VC++ is greater and Network applications also VC++ is better, I worked in network application for small period by VC++, C# and Java
really really VC++ was veryyyyyyyy good and then comes C# then JAVA :S (As I hate it:D)
C# for ADO application is better. as well as your preferred language for web development if you came from C++ world.
Look, you should make use of IDE, if you have big project use the appropriate language in appropriate module.
I think one should be very careful when comparing pure c++ and c++.net. The two are very different beasts.
If you must use dotnet use c# or vb.net.
yes Iamthwee, my comparison built on this, So what do you see, Is is better than C# in all cases?
no single language is EVER better than another at everything
>Is is better than C# in all cases?
No way, vc++.net is worser than c# in all cases. Pure c++ is another matter of course.
When it comes to getting the job done, whichever you are more familiar with. If I'm paying someone by the hour, I'd be hard pressed to tell them which .NET language to use if they're already familiar with one over the other. Sure, learning new languages is a good thing, but makes for a bad business model.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.