CheckValidNumber Flashcards
1
Q
What does this check?
if (Regex.IsMatch(Item, “^[0-9]+$”))
A
Confirms that Item is purely digits (no operators or negative signs).
2
Q
What does this do?
if (ItemAsInteger > 0 && ItemAsInteger <= MaxNumber)
A
ensures it’s in range (1 to MaxNumber)
3
Q
What is the main purpose of this method?
A
method used in checking numeric tokens. Helps avoid invalid strings from messing with the game.