Detect OS at runtime

Hi All,

can an app detect which OS it is built for at runtime? Or maybe there is a static property?


#if target…

check the target constants. You can know some things on build time.

See the doc page for conditional compile.

Awesome, I was looking at #pragma directives, obviously wrong place.