Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Mobile development: C++ or C# -- which one is better? why?

While doing Windows Mobile development, which language should I use? C# or C++ or something else? Why one is better than others?

like image 418
Just a learner Avatar asked Dec 22 '22 05:12

Just a learner


2 Answers

It depends what you're coding.

Making native calls to the OS are possible via P/Invoke from C#, but extensive use is probably easier via native C++. You'll also require C++ for using some hardware that has not been wrapped by the Compact Framework.

Most hardware (GPS, camera, etc.), is available via CF. If you're working with a Win Mobile 6.x device, you're probably better off with C#. In addition to hardware, Pocket Office's (POOM) object model is also available to C#, so you can integrate with it.

It's worth noting that most references to Windows Phone 7 refer to managed code and the possibility of Silverlight. With Silverlight in the mix, you'll have to code with C#.

Unless your app is high performance or is extremely miserly with memory, use C# or VB.NET.

Scott

like image 127
Scott Davies Avatar answered Feb 23 '23 23:02

Scott Davies


It depends on task mainly.

c++ has following pros/cons:

  • Direct access to resources, faster programs
  • Can access very deep OS parts, not needed for high level applicaiton
  • harder to develop and requires to manage resources by developer

C#:

  • Runs under virtual machine (CLR), that's why is slower
  • Faster and easier application development
  • Rich build-in library
like image 22
Andrey Avatar answered Feb 24 '23 00:02

Andrey