Answers for "string is int f#"

C#
0

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
Posted by: Guest on June-17-2021

C# Answers by Framework

Browse Popular Code Answers by Language