使用时如何检查字符串中是否有数字值console.readline
?
PlayerNode playerList = new PlayerNode();
for (int x = 1; x <= numPlayers; x++)
{
Console.WriteLine("What is your name?");
Player Aplayer = new Player();
Aplayer.Name = Console.ReadLine();
playerList.AddPlayer(Aplayer);
Console.WriteLine("How Much money do you want to play with?");
Aplayer.Winnings = float.Parse(Console.ReadLine());// How would i change this to check for number values?
}