Mega Code Archive

 
Categories / VB.Net / Data Types
 

Decimal ToByte Method Converts the value of the specified Decimal to the equivalent 8-bit unsigned integer

Imports System Imports Microsoft.VisualBasic Module DecimalToS_ByteDemo     Sub DecimalToS_Byte( argument As Decimal )         Dim SByteValue    As Object         Dim ByteValue   As Object         Try             SByteValue = Decimal.ToSByte( argument )         Catch ex As Exception             Console.WriteLine( ex )         End Try         Try             ByteValue = Decimal.ToByte( argument )         Catch ex As Exception             Console.WriteLine( ex )         End Try     End Sub     Sub Main( )         DecimalToS_Byte( 78D )     End Sub  End Module