2010年12月4日

完美解决VB中int to short溢出问题

摘要: 工作笔记,英文烂没办法,如果不幸被你看到,请勿喷。。。Summary:To unsigned type: just do And operator, or 2st method.Eg. Dim a As Byte = CByte(300 And &HFF)To signed type: left shift n bits, then right shift n bits, which is to expand the signed bit. n = (sizeof(type1) - sizeof(type2)) * 8 orVB:use Len(New type) instead of siz 阅读全文

posted @ 2010-12-04 09:37 长空无忌 阅读(1833) 评论(0) 推荐(1) 编辑

导航