DotNet · 2019年10月31日

VB.net中Int32整型转换为2个Int16整型

Int32转换为2个int16整型
Dim pInt16_1 As Int16 = Convert.ToInt16(pInt32 >> 16)

Dim pInt16_2 As UInt16 = Convert.ToUInt16(pInt32 And &HFFFF)   ‘低字节须按照无符号整型处理
2个Int16整型转换为长整型
Dim pInt32 As Int32 = Convert.ToInt32(pInt16_1) << 16
pInt32 += pInt16_2

最新电影,电视剧,尽在午夜剧场

电影电视剧午夜不寂寞