Convert.ToSingle (Int64) converts 64-bit signed integer to single-precision floating-point number. : Convert to Single « 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 Single 




Convert.ToSingle (Int64) converts 64-bit signed integer to single-precision floating-point number.
  

Class Sample
   Public Shared Sub Main()
        Dim numbers() As Long = Int64.MinValue, -9072, Int64.MaxValue}
        Dim result As Single
        
        For Each number As Long In numbers
           result = Convert.ToSingle(number)
           Console.WriteLine("Converted the {0} value '{1}' to the {2} value {3}.", _
                             number.GetType().Name, number, _
                             result.GetType().Name, result)
        
        Next
    End Sub 
End Class 

   
    
  














Related examples in the same category
1.Convert.ToSingle (Boolean) converts Boolean value to single-precision floating-point number.
2.Convert.ToSingle (Byte) converts 8-bit unsigned integer to single-precision floating-point number.
3.Convert.ToSingle (Decimal) converts decimal number to single-precision floating-point number.
4.Convert.ToSingle (Double) converts double number to single-precision floating-point number.
5.Convert.ToSingle (Int16) converts 16-bit signed integer to floating-point number.
6.Convert.ToSingle (Int32) converts 32-bit signed integer to single-precision floating-point number.
7.Convert.ToSingle (Object) converts object to a single-precision floating-point number.
8.Convert.ToSingle (SByte) converts signed integer to single-precision floating-point number.
9.Convert.ToSingle (String) converts string to single-precision floating-point number.
10.Convert.ToSingle (UInt16) converts 16-bit unsigned integer to single-precision floating-point number.
11.Convert.ToSingle (UInt32) converts 32-bit unsigned integer to single-precision floating-point number.
12.Convert.ToSingle (UInt64) converts 64-bit unsigned integer to single-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.