Convert.ToDouble (String) converts string to double-precision floating-point number. : Convert to Double « Development « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Development » Convert to Double 




Convert.ToDouble (String) converts string to double-precision floating-point number.
  


Module Example
   Public Sub Main()
        Dim values() As String = "-1,035.7""1AFF""1e-35""190.34001""1.29e325"}
        Dim result As Double
        
        For Each value As String In values
           Try
              result = Convert.ToDouble(value)
              Console.WriteLine("Converted '{0}' to {1}.", value, result)
           Catch As FormatException
              Console.WriteLine("Unable to convert '{0}' to a Double.", value)            
           Catch As OverflowException
              Console.WriteLine("'{0}' is outside the range of a Double.", value)
           End Try
        Next       
   End Sub
End Module

   
    
  














Related examples in the same category
1.Convert.ToDouble (Decimal) converts decimal number to double-precision floating-point number.
2.Convert.ToDouble (Int16) converts specified 16-bit signed integer to double-precision floating-point number.
3.Convert.ToDouble (Int32) converts 32-bit signed integer to double-precision floating-point number.
4.Convert.ToDouble (Int64) converts 64-bit signed integer to double-precision floating-point number.
5.Convert.ToDouble (Object) converts object to a double-precision floating-point number.
6.Convert.ToDouble (SByte) converts 8-bit signed integer to double-precision floating-point number.
7.Convert.ToDouble (Single) converts single-precision floating-point number to double-precision floating-point number.
8.Convert.ToDouble (String, IFormatProvider) converts string to double using culture-specific format
9.Convert.ToDouble (UInt16) converts 16-bit unsigned integer to double-precision floating-point number.
10.Convert.ToDouble (UInt32) converts 32-bit unsigned integer to double-precision floating-point number.
11.Convert.ToDouble (UInt64) converts 64-bit unsigned integer to double-precision floating-point number.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.