📜  c# 检测字符串是否有数字并存储它 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:12.359000             🧑  作者: Mango

代码示例1
string input = Console.ReadLine();
int parsedId;
int.TryParse(input, out parsedId)
//i tried it on string that are more than just numbers it can detect but cant store
//example input=65,parsedId=65    input=65acd,parseid=0 ??
//i say youre better of learning regex or linq (i know it sucks)
//upvote so my whore ex wife gives me back the kids