C# Or C++ .net?

Does C# Have The Power Of C++, Or C++ Still The Best?

I Am Talking From 3D Application Side

[104 byte] By [HassanAyoub] at [2007-12-24]
# 1

" Am Talking From 3D Application Side"

I would say C# is more powerfull in this scenerio because Programming in C# is rather easy than in C++ so any code written for 3D application in C++ requires more effort to do the same work done in C# with less effort.

Today, DirectX fullly supports 3D game development in Managed programming environment as it does in un managed programming Environment, with less effort required to develop the same thing what you do with C++ while feeling pain in A**.

Overall, I think C++ is the most powerfull language and it'll remain the same but it depends on the tast you have to perform. There are many high level tasks which can be achieved very easily in C# but not easily with C++.

E.G you need to develop a very cool UI, to do it in C# is just to drag controls from toolbox to your Form but the same thing to do in C++ is itself a project in it own.

There are some other examples such as low level OS Interaction like Firewall Development where C# has to depend on C++ itself.

Conclusion is that it all depends on your requirement and your thinking to evaluate the power of a language.

I hope this text pretty much clears the concept.

Best Regards,

RizwanSharp at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 2

Thx For Your reply.

So, I Can Use C# As My Mail Language, And C++ As The Hidden Language?

HassanAyoub at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Hassan Ayoub wrote:

So, I Can Use C# As My Mail Language, And C++ As The Hidden Language?

Again this Depends on the requirement that what kinda software you want to develop if 3D Applications then C# will provide you a fast track with the same power. In this Situation C# is the best.

As I mentioned in my last post that C++ has a very limited use now a days which is Low level, like Firewall, Antiviruses, Secure Delete Software, Encryption etc.

I hope It will help you to have a choice out of 2 languages,

Cheers ;-)

RizwanSharp at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 4

If you're comparing to managed languages, they're about the same. Each compiles down to the same intermediate language and suffers from the same speed/performance issues.

If you're talking about the difference between C# and native C++, then C++ will always be faster--there's much less overhead in the unmanaged world. You can mix managed and native code with C++ to get the best of both worlds with VS2005. C++ interop. automatically performs all the PInvoking/Marshaling implicitly when you mix managed classes with unmanaged classes with Visual C++. If performance is an issue but you still want to use managed code, this may be your best bet. Mixing C# with native C++ is much more tedious, you have to explicitly PInvoke/Marshal communication between managed and native code with C#.

PeterRitchie at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 5

Thx Alot,

And I Hope That I Success In This

HassanAyoub at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 6
If you plan on using legacy/existing C++ code via COM I would stay away from C#. You can't pass an array from C# to C++ via COM. This can pose a serious problem.

If you decided to write certain speed critical parts of your code in C++ and call it from C# you can not pass in arrays. Keep that in mind.

Boise83716 at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 7

I Didnt Find Right Now A Good Answer.

Please Tell Me Breifly C++, C++.net Or C# Is The Best?

HassanAyoub at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 8

I have tried to explain briefly and descriptive with good reasons and use of languages, you can choose C# as main language and Learn C++'s basic to support your work in C# where C# is not helpfull I told your the situations clearly.

Secondly Mind this, If it takes 1 year to learn C#, to learn C++ at same level you'll need abuot 5 years then you'll have equallent knowledge of both languages.

So Choice is yours ;-)

RizwanSharp at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 9

Dear,

I Dont Care About Time, Difficulty Or Effort Needed.

All What I Care About Is: When I Start Working And Finish My Work, I Want To See A Wonderfull Work.

You Get It?

HassanAyoub at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 10

how come u say that C++/CLI and C# has the same speed ? cuz i don;t belive u...

i did a form with a button

when i clicked the button, there where 2 for's (i=0;i<1000000li++) and (j=0;j<10000;j++)

and a message box whene they are done;

at bouth i use Optimize Code from project propertis, and C# took like 10 sec and C++/CLI (CLR Project) was instantly

try it if u dont belive

Terrax at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...
# 11

Thi Is Right.

Thx Man.

C++ Is The Best And Faster Language

HassanAyoub at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# General...