C++ or C#.NET

G

Guest

I'm planning to enter the shareware business and I was wondering what is your
opinion should I go for C++/MFC or with C#.NET regarding of
1) performance and 2)capabilities meaning that I want as much access to the
OS as possible.

PS: What about decompiling ... I know that Java code can be decompiled
easily is this the same case with C#.NET?
 
W

William DePalo [MVP VC++]

Sotiris Salloum said:
I'm planning to enter the shareware business and I was wondering what is
your
opinion should I go for C++/MFC or with C#.NET regarding of
1) performance and

The answer will depend on your application. There is no easy answer.
However, if performance is the first item in the must-have feature set, then
you can't go wrong with C++

2)capabilities meaning that I want as much access to the OS as possible.

..Net provides easy access to most but not all of the Win32 API. It does have
a "Platform/Invoke" capbility that takes care of the rest. Of course, since
Win32 is largey a C API and what isn't is C is COM with C++ you can't go
writing here either.
PS: What about decompiling ... I know that Java code can be decompiled
easily is this the same case with C#.NET?

Yes.

Regards,
Will
 
L

Lloyd Dupont

I'm planning to enter the shareware business and I was wondering what is
your
opinion should I go for C++/MFC or with C#.NET regarding of
1) performance and
pure (unmanaged) C++ is NOT THAT MUCH more performant than C#.
even the worst comparison I've seen gave C++ weak advantage (best advantage
I've seen, if I remember well should be around 20%, but in most case it's
more like 5%).

But productivity is much lower with MFC/C++ (compare to C#/ManagedC++/.NET).
Also it's easy to write good looking Application with .NET. Probably due to
better productivity hey ;-)
For example it tooks me 3Hours to rewrite from scratch Apple's color well
for Winodws/.NET. (with all the bells and whistles such as enabled shading,
focus rect, click on enter, orange border on mouse over, etc...)
2)capabilities meaning that I want as much access to the
OS as possible.
used a mix of Managed C++ & C#.
while you could theoritically do everything in C# (include all WinAPI), it's
some times more practical to use ManagedC++ for that.
PS: What about decompiling ... I know that Java code can be decompiled
easily is this the same case with C#.NET?
Yep
 
T

Tom Serface

One good thing about C++ is that you can use it for managed or unmanaged
code or a combination of the two to increase performance where needed. Of
course, I'm a C++ programmer and this is a C++ forum so ...

:blush:)

Tom
 
N

Nishant Sivakumar

You might want to know that VC++ 2005 can be used to write both managed and
native apps, and for managed apps, it can be considered to be a slightly
better option that C# or VB. I've got an article on this that you may want
to read :-

A rational attempt to substantiate C++/CLI as a first class CLI language
http://www.codeproject.com/managedcpp/whycppcli.asp
 
R

riscy

C# is easier to code application and much more reliable since it is
designed to be type safe, where C++ use pointer which is not type safe,
in other word it is programmer responsibility to track of type variable
when pointer is applied. C# on other hand reduce that responsibility
and take strain out of the programmer task. There are several
alternative technique in C# that replace pointer and found be to
effective.

It also easier to read the code left behind for several month.

You can bring unmanaged code (ie COM library) into manage code using
interop service, they well document on various website...just need time
to get use to it. (It took me 1-2 day).

The .net framework library is written in C# by the way.

The only negative side as far as I can see that I have not seen C# code
being used for gaming application...possibly due to lower level access
to speed or access to driver/hardware issue but I might be wrong.

It worth adopting OOP practice as well.

You can do both due to the eay JIT work.

Good luck

Riscy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top