Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ToInt32() [16/19]

static int System.Convert.ToInt32 ( string? value,
int fromBase )
inlinestatic

Definition at line 2585 of file Convert.cs.

2586 {
2587 if (fromBase != 2 && fromBase != 8 && fromBase != 10 && fromBase != 16)
2588 {
2589 throw new ArgumentException(SR.Arg_InvalidBase);
2590 }
2591 if (value == null)
2592 {
2593 return 0;
2594 }
2595 return ParseNumbers.StringToInt(value.AsSpan(), fromBase, 4096);
2596 }

References System.SR.Arg_InvalidBase, System.ParseNumbers.StringToInt(), and System.value.