ParseInt64() static private méthode

static private ParseInt64 ( String value, NumberStyles options, NumberFormatInfo numfmt ) : Int64
value String
options NumberStyles
numfmt NumberFormatInfo
Résultat Int64
Exemple #1
0
        // Parses a long from a String in the given style.  If
        // a NumberFormatInfo isn't specified, the current culture's
        // NumberFormatInfo is assumed.
        //
        /// <include file='doc\Int64.uex' path='docs/doc[@for="Int64.Parse3"]/*' />
        public static long Parse(String s, NumberStyles style, IFormatProvider provider)
        {
            NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);

            NumberFormatInfo.ValidateParseStyle(style);
            return(Number.ParseInt64(s, style, info));
        }
Exemple #2
0
 public static long Parse(string s, IFormatProvider?provider)
 {
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseInt64(s, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider)));
 }
Exemple #3
0
 public static long Parse(string s)
 {
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseInt64(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo));
 }
Exemple #4
0
 public static long Parse(string s, [Nullable(2)] IFormatProvider provider)
 {
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseInt64((ReadOnlySpan <char>)s, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider)));
 }
Exemple #5
0
 public static long Parse(string s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseInt64(s, style, NumberFormatInfo.CurrentInfo));
 }
Exemple #6
0
 // Parses a long from a String in the given style.  If
 // a NumberFormatInfo isn't specified, the current culture's
 // NumberFormatInfo is assumed.
 //
 public static long Parse(String s, NumberStyles style, IFormatProvider provider)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     if (s == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     }
     return(Number.ParseInt64(s.AsReadOnlySpan(), style, NumberFormatInfo.GetInstance(provider)));
 }
 public static long Parse(string s, NumberStyles style, IFormatProvider provider)
 {
     NumberFormatInfo2.ValidateParseStyleInteger(style);
     return(Number.ParseInt64(s, style, NumberFormatInfo.GetInstance(provider)));
 }
 public static long Parse(string s, NumberStyles style)
 {
     NumberFormatInfo2.ValidateParseStyleInteger(style);
     return(Number.ParseInt64(s, style, NumberFormatInfo.CurrentInfo));
 }
 public static long Parse(string s, IFormatProvider provider)
 {
     return(Number.ParseInt64(s, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider)));
 }
 public static long Parse(string s)
 {
     return(Number.ParseInt64(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo));
 }
Exemple #11
0
 public static long Parse(ReadOnlySpan <char> s, NumberStyles style = NumberStyles.Integer, IFormatProvider?provider = null)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     return(Number.ParseInt64(s, style, NumberFormatInfo.GetInstance(provider)));
 }
Exemple #12
0
 // Parses a long from a String in the given style.  If
 // a NumberFormatInfo isn't specified, the current culture's
 // NumberFormatInfo is assumed.
 //
 //| <include path='docs/doc[@for="Int64.Parse3"]/*' />
 public static long Parse(String s, NumberStyles style)
 {
     NumberFormatInfo.ValidateParseStyle(style);
     return(Number.ParseInt64(s, style));
 }
Exemple #13
0
 // Parses a long from a String in the given style.  If
 // a NumberFormatInfo isn't specified, the current culture's
 // NumberFormatInfo is assumed.
 //
 public static long Parse(string s, NumberStyles style, IFormatProvider? provider)
 {
     NumberFormatInfo.ValidateParseStyleInteger(style);
     if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
     return Number.ParseInt64(s, style, NumberFormatInfo.GetInstance(provider));
 }