Mega Code Archive

 
Categories / VB.Net / Development
 

BitConverter GetBytes (Int32) returns 32-bit signed integer value as an array of bytes

Imports System Imports Microsoft.VisualBasic Module GetBytesInt32Demo     Sub GetBytesInt32( argument As Integer )         Dim byteArray As Byte( ) = BitConverter.GetBytes( argument )         Console.WriteLine(BitConverter.ToString( byteArray ) )     End Sub      Sub Main( )         GetBytesInt32( 15 )     End Sub  End Module