string is int f#
Code Example - string is int f#
let str = Console.ReadLine()
match int.TryParse str with
| true, num -> printfn "%i" num
| _ -> failwithf "'%s' is not an integer" str
let str = Console.ReadLine()
match int.TryParse str with
| true, num -> printfn "%i" num
| _ -> failwithf "'%s' is not an integer" str