Answers for "string or int c#"

C#
1

string in int c#

//convertieren mit Nutzereingabe/convert with user input
int Variable = Convert.ToInt32(Console.ReadLine());
//nur konvertieren/only convert
int Variable = Convert.ToInt32();
Posted by: Guest on March-31-2021
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