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

◆ Parse() [5/13]

static byte System.Byte.Parse ( ReadOnlySpan< char > s,
NumberStyles style,
NumberFormatInfo info )
inlinestaticprivate

Definition at line 119 of file Byte.cs.

120 {
121 uint result;
122 Number.ParsingStatus parsingStatus = Number.TryParseUInt32(s, style, info, out result);
123 if (parsingStatus != 0)
124 {
125 Number.ThrowOverflowOrFormatException(parsingStatus, TypeCode.Byte);
126 }
127 if (result > 255)
128 {
129 Number.ThrowOverflowException(TypeCode.Byte);
130 }
131 return (byte)result;
132 }

References System.info, System.s, System.Number.ThrowOverflowException(), System.Number.ThrowOverflowOrFormatException(), and System.Number.TryParseUInt32().