BitConverter.GetBytes Returns the specified 16-bit unsigned integer value as an array of bytes.
Imports System
Imports Microsoft.VisualBasic
Module GetBytesUInt16Demo
Sub GetBytesUInt16( argument As UInt16 )
Dim byteArray As Byte( ) = BitConverter.GetBytes( argument )
Console.WriteLine( BitConverter.ToString( byteArray ) )
End Sub
Sub Main( )
GetBytesUInt16( Convert.ToUInt16( 10000 ) )
End Sub
End Module