问题描述
大家好,
如何在vb.net上使用stringbuilder的最大容量?
strinbuilder的最大容量为2.147.483.647,而我只能达到134.217.728!
我已经尝试过SecureCapacity方法(
hey guys,
how can I use the maximum capacity of a stringbuilder on vb.net ???
strinbuilder''s max capacitry is 2.147.483.647 and i can reach only 134.217.728 !
i''ve tried the EnsureCapacity method (
Dim stra As New System.Text.StringBuilder
stra.EnsureCapacity(stra.MaxCapacity)
),但是什么都没发生!
我也尝试过声明strinbuilder的容量为maxcapacity(
) but nothing happened !
I''ve also tried declaring the strinbuilder with capacity= maxcapacity (
Dim stra As New System.Text.StringBuilder(2147483647)
但还是一无所有!!!
请帮忙!!!!
[edit]
我想制作一个程序,该程序的一部分将文件读入stringbuilder
如果文件是"1GB左右",我无法在其中读取它!
无论如何,我不是想达到Int32.MaxValue我只希望它读取超过134.217.728字节!
但是我对内存管理来说还很陌生,我不知道这怎么可能!
也许有元帅课?
[/edit]
but still nothing !!!
help please !!!!
[edit]
I want to make a program and part of this program reads a file into a stringbuilder
if the file is ''bout of 1GB i can''t read it in it !
anyway, Im not trying to reach Int32.MaxValue i just want it to read more than 134.217.728 bytes !
but im pretty new to memory management and i dont know how''s that possible !
maybe with Marshal class ?
[/edit]
推荐答案
这篇关于vb.net如何达到stringbuilder的最大容量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!