Windows Universal Apps C++ vs C#

Asked

Viewed 194 times

5

What’s the difference between C# and C++ to develop universal apps?

I saw that in the templates of Visual Studio 2015 for C++ there is a group Cross Plataform with app templates for android and Ios.

  • How does it work?

  • How VC++ can compile for different devices?

  • The compiler used is VC itself++?

That’s four questions, actually. :)

2 answers

1

Basically, you can use C++/C# to create IOS, Android and Windows application and use Shared project to share class library between platforms, is a Solution that builds several different binaries, one for each operating system.

To understand how it does this you have to understand how the compilation is, briefly you are transforming a strongly abstract code to a code closer to the machine language, but this generated object code is natively created for an operating system. Formerly the compiler only generated code for the Windows operating system, now it can create different binaries for Android and IOS as well.

This last question did not find anything concrete, but it is very likely that he is using Xamarin’s technology to do.

More information: https://www.visualstudio.com/explore/cplusplus-mdd-vs.aspx

  • Well, as far as I know, C# for android is only possible through Xamarin. My question is whether these templates c++ for Andoid are also based on Xamarin. And when it comes to universal apps, is there any difference in an app made with c++ or c#? I don’t know if I’m right, but it seems to me that a universal app made in c++ is native while one made in C# is not.

  • Both are native, both C++ and C#. And this technology doesn’t use Universal App, the Universal App is a technology that Microsoft created for development between Windows Desktop and Windows Phone platform and mainly serves to be used in the Windows Store, which can cause confusion is that, both UWP and this new technology, has a similar architecture standard.

0

At Xamarim University you get these answers. To generate code for IOS you use Xcode and for Android Android Studio. The VS generates the binaries automatically for each environment, using the platform compiler. The chosen language can be c++ or c#, however you will only get access to the usual controls. Any specific library will need to be created in a specific OS code.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.