コード例 #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
ファイル: SByte.cs プロジェクト: zuimengaitianya/corefx
 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)));
 }