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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does this do?
if (ItemAsInteger > 0 && ItemAsInteger <= MaxNumber)

A

ensures it’s in range (1 to MaxNumber)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly