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

◆ TryParse() [12/13]

static bool System.Int16.TryParse ( ReadOnlySpan< char > s,
NumberStyles style,
NumberFormatInfo info,
out short result )
inlinestaticprivate

Definition at line 194 of file Int16.cs.

195 {
196 if (Number.TryParseInt32(s, style, info, out var result2) != 0 || (uint)(result2 - -32768 - ((int)(style & NumberStyles.AllowHexSpecifier) << 6)) > 65535u)
197 {
198 result = 0;
199 return false;
200 }
201 result = (short)result2;
202 return true;
203 }

References System.info, System.s, and System.Number.TryParseInt32().