Dim st As String =""
Dim st1 As String ="0000000000000000"
Dim i As Integer
Dim i2 As Integer=0
For i = 0 To 40 Step 5
Dim i1 As Integer =8-cstr(DecToHex(i)).PadLeft(2,"0").Length
If i2=0 Then
st= st1.Remove(i1,cstr(DecToHex(i)).PadLeft(2,"0").Length)
st= st.Insert(i1,cstr(DecToHex(i)).PadLeft(2,"0"))
End If
i2=i2+1
If i2=1 Then
Continue For
End If
If i2=2 Then
Dim i3 As Integer =16-cstr(DecToHex(i)).PadLeft(2,"0").Length
st= st.Remove(i3,cstr(DecToHex(i)).PadLeft(2,"0").Length)
st= st.Insert(i3,cstr(DecToHex(i)).PadLeft(2,"0"))
i2=0
End If
Output.Show(st)
st1 ="0000000000000000"
Next
结果:
0000000000000005
0000000A0000000F
0000001400000019
0000001E00000023
我要的结果是
0000000000000005
000000060000000B
0000000C00000011
0000001200000017
请老师帮忙看看呢