CByte: convert to byte : Data Type Convert « Data Type « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Data Type » Data Type Convert 
2.45.2.CByte: convert to byte
Module Tester
    Public Sub Main()
        Dim iInteger As Integer = 5280
        Dim lLong As Long
        Dim bytByte As Byte
        Dim sngSingle As Single
        Dim dblDouble As Double
        Dim decDecimal As Decimal

        Console.Writeline("Convert to a Byte: {0}", CByte(iInteger))
    End Sub

End Module
Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflow.
   at Tester.Main()
2.45.Data Type Convert
2.45.1.CLng: convert integer to long
2.45.2.CByte: convert to byte
2.45.3.CSng: convert to Single
2.45.4.CDbl: convert to double
2.45.5.CDec: convert to decimal
2.45.6.Call Int64TryParse(String, NumberStyles, IFormatProvider, Int32)
2.45.7.Convert a string into a 64-bit signed integer value using the Int64.Parse(String) method
2.45.8.Convert.ToBase64CharArray() and Convert.FromBase64CharArray methods
2.45.9.Converts the bit patterns of UInt32 values to Byte arrays with the GetBytes method.
2.45.10.Convert.ToString( non-numeric types, IFormatProvider ).
2.45.11.Create a hexadecimal value out of range of the UInt64 type and Convert it back to a number.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.