Answers for "check if string is int f#"

C#
0

c# see if string is int

bool result = int.TryParse("123", out var n);
Posted by: Guest on August-10-2020
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