I'm porting my code to the new unified xamarin.ios api.
I have this as a parameter in a method.
nfloat fontSize = 0f
The compiler complains...
Error CS1750: Optional parameter expression of type `float' cannot be converted to parameter type `System.nfloat'
How do I write a literal for an optional parameter of nfloat?
You can't.
The native types in Xamarin.iOS/Xamarin.Mac (nfloat
, nint
, nuint
) are not intrinsic managed types, and thus you can't create constants of those types.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With