public static bool TryParse(string s, out long result) { if (s != null) { return(Number.TryParseInt64IntegerStyle((ReadOnlySpan <char>)s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result) == Number.ParsingStatus.OK); } result = 0L; return(false); }
public static bool TryParse([NotNullWhen(true)] string?s, out long result) { if (s == null) { result = 0; return(false); } return(Number.TryParseInt64IntegerStyle(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result) == Number.ParsingStatus.OK); }
public static bool TryParse(ReadOnlySpan <char> s, out long result) { return(Number.TryParseInt64IntegerStyle(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result) == Number.ParsingStatus.OK); }