示例#1
0
 public static uint Parse(ReadOnlySpan <char> s, NumberStyles style = NumberStyles.Integer, IFormatProvider provider = null)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseUInt32(s, style, NumberFormatInfo.GetInstance(provider)));
 }
示例#2
0
 public static long Parse(string s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseInt64(s, style, NumberFormatInfo.CurrentInfo));
 }
示例#3
0
 public static bool TryParse(ReadOnlySpan <char> s, NumberStyles style, IFormatProvider provider, out sbyte result)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(TryParse(s, style, NumberFormatInfo.GetInstance(provider), out result));
 }
示例#4
0
 public static long Parse(string s, NumberStyles style, IFormatProvider provider)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseInt64(s, style, NumberFormatInfo.GetInstance(provider)));
 }
示例#5
0
 public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out long result)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.TryParseInt64(s, style, NumberFormatInfo.GetInstance(provider), out result));
 }
示例#6
0
 public static bool TryParse(ReadOnlySpan <char> s, NumberStyles style, IFormatProvider?provider, out long result)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.TryParseInt64(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK);
 }
示例#7
0
 public static uint Parse(String s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseUInt32(s, style, NumberFormatInfo.CurrentInfo));
 }
示例#8
0
 public static bool TryParse(ReadOnlySpan <char> s, out long result, NumberStyles style = NumberStyles.Integer, IFormatProvider provider = null)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.TryParseInt64(s, style, NumberFormatInfo.GetInstance(provider), out result));
 }
示例#9
0
文件: Byte.cs 项目: shrah/coreclr
 public static byte Parse(String s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Parse(s, style, NumberFormatInfo.CurrentInfo));
 }
示例#10
0
 public static ushort Parse(String s, NumberStyles style, IFormatProvider provider)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Parse(s, style, NumberFormatInfo.GetInstance(provider)));
 }