I have a function in F#, where I take an int value and return the int as a string.
let inttostring (x:int):string =
""+x
I can't get ToString to work. Any help would be appreciated.
Empty string "" isn't compatible with x which is of int type. You can use
let int2String x = sprintf "%i" x
or
let int2String (x: int) = string x
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