看板 Visual_Basic 關於我們 聯絡資訊
1 小弟要讀取一個大約600MB的 txt file 但是會出現out of memory 如何改善? 小弟電腦配備如下 win7 64 bit 16G ram code 如下 Private Function ReadFile1(sFile As String) As Byte() Dim nFile As Integer nFile = FreeFile Open sFile For Input Access Read As #nFile If LOF(nFile) > 0 Then ReadFile1 = InputB(LOF(nFile), nFile) End If Close #nFile End Function 2 VB的dictionary 如何 加入新的type到item 例如 在dictionary的item加入dictionary 語法如下 ditionary.add "string1",new dictionary ditionary.add "string2",new dictionary string1 和 string2的item是不同的object 但是type如何加到dictionary 小弟試過code如下 Type A B as integer C as string End type dim A1 as A A1.B=1 dictionary.add "string1",A1 A1.B=2 dictionary.add "string2",A1 但是此時 string1 & string2 的 A1.B都是相同的 如何令string1的A1.B=1 & string2的A1.B=2 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.173.162.193 ※ 文章網址: https://www.ptt.cc/bbs/Visual_Basic/M.1432738045.A.790.html
MOONRAKER: A1都同一個物件當然馬相同 05/28 09:46