So I'm in this udemy class, and they used a deprecated piece of code below. I realize a switch or if statement would work for this, but I wanted to see if there was something other than RuntimePlatform with a switch to replace this. I did like this functionality after all.
Device.OnPlatform<Thickness>(
iOS: new Thickness(0, 20, 0, 0),
Android: new Thickness(0, 10, 0, 0),
WinPhone: new Thickness(0, 10, 0, 0));
Admittedly it did not appear like it, but i'm hoping to be pleasantly surprised!
question from:https://stackoverflow.com/questions/65930781/new-equivalent-for-old-onplatform-method-used-in-c-sharp-with-type-arguement