System.Xml.XmlConvert.ToInt64 C# (CSharp) Méthode

ToInt64() public static méthode

public static ToInt64 ( string s ) : System.Int64
s string
Résultat System.Int64
        public static Int64 ToInt64(string s)
        {
            return Int64.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
        }

Usage Example

Exemple #1
0
 public static long ToInt64(string value)
 {
     try
     {
         return(XmlConvert.ToInt64(value));
     }
     catch (ArgumentException exception)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(value, "Int64", exception));
     }
     catch (FormatException exception)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(value, "Int64", exception));
     }
     catch (OverflowException exception)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(value, "Int64", exception));
     }
 }
All Usage Examples Of System.Xml.XmlConvert::ToInt64