Computer Magic Logo
Retrieve different values for each platform

Sunday, April 10, 2016

Published by Aristotelis Pitaridis

The Device.OnPlatform member function can take three parameters and return one of these values depending on the operating system that the application is executed.

int iOSValue = 12;
int AndroidValue = 13;
int WindowsValue = 14;

int Value = Device.OnPlatform(iOSValue, AndroidValue, WindowsValue);