Convert.ToSByte (Int64) converts 64-bit signed integer to 8-bit signed integer. : Convert to SByte « 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 SByteScreenshots 
Convert.ToSByte (Int64) converts 64-bit signed integer to 8-bit signed integer.
  

Module Example
   Public Sub Main()
        Dim numbers() As Long = Int64.MinValue, -101211340, Int64.MaxValue }
        Dim result As SByte
        For Each number As Long In numbers
           Try
              result = Convert.ToSByte(number)
              Console.WriteLine(result)
           Catch As OverflowException
              Console.WriteLine("The {0} value {1} is outside the range of the SByte type.", _
                                number.GetType().Name, number)
           End Try
        Next
   End Sub
End Module

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