Click here to Skip to main content
15,914,386 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to save DataSet to exist MDB file? Pin
Christian Graus10-Aug-08 0:51
protectorChristian Graus10-Aug-08 0:51 
QuestionRead Large File Pin
Reza Shojaee9-Aug-08 20:27
Reza Shojaee9-Aug-08 20:27 
AnswerRe: Read Large File Pin
Guffa9-Aug-08 22:23
Guffa9-Aug-08 22:23 
GeneralRe: Read Large File Pin
Reza Shojaee9-Aug-08 23:25
Reza Shojaee9-Aug-08 23:25 
GeneralRe: Read Large File Pin
User 665810-Aug-08 0:22
User 665810-Aug-08 0:22 
GeneralRe: Read Large File Pin
#realJSOP10-Aug-08 1:08
professional#realJSOP10-Aug-08 1:08 
GeneralRe: Read Large File Pin
Guffa10-Aug-08 6:55
Guffa10-Aug-08 6:55 
AnswerRe: Read Large File [modified] Pin
#realJSOP10-Aug-08 1:16
professional#realJSOP10-Aug-08 1:16 
A string can theoretically only hold 2,147,483,647 characters. However, on a 32-bit OS, you never have that much contiguous memory available, so you'll probably never be able to create a string that large. Beyond that, no single array or structure can contain more than 1 billion items.

If you're running a 64-bit OS, you will realize larger strings, but you still might not be able to allocate their full size unless you have 4-8gb of RAM.

So, your problem is fragmented memory. With .Net, I'm not sure there's much you can do about it beyond allocating the string at program startup and hope you have enough unfragmented memory at that point. I would also use a StringBuilder object instead of a string because the constructor for a StringBuilder allows you to specify the size of the object, and you can put a try/catch block around the constructor call to make sure the framework didn't have any allocation problems.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


modified on Sunday, August 10, 2008 7:23 AM

AnswerRe: Read Large File Pin
Reza Shojaee10-Aug-08 2:11
Reza Shojaee10-Aug-08 2:11 
GeneralRe: Read Large File Pin
Mohammad Dayyan10-Aug-08 4:25
Mohammad Dayyan10-Aug-08 4:25 
GeneralRe: Read Large File Pin
Guffa10-Aug-08 6:53
Guffa10-Aug-08 6:53 
GeneralRe: Read Large File Pin
Mohammad Dayyan10-Aug-08 9:22
Mohammad Dayyan10-Aug-08 9:22 
AnswerRe: Read Large File Pin
PIEBALDconsult10-Aug-08 7:21
mvePIEBALDconsult10-Aug-08 7:21 
QuestionIs possible to create WinForm into the HTML tags ? Pin
Mohammad Dayyan9-Aug-08 13:00
Mohammad Dayyan9-Aug-08 13:00 
AnswerRe: Is possible to create WinForm into the HTML tags ? Pin
Colin Angus Mackay9-Aug-08 13:46
Colin Angus Mackay9-Aug-08 13:46 
AnswerRe: Is possible to create WinForm into the HTML tags ? Pin
Christian Graus9-Aug-08 16:23
protectorChristian Graus9-Aug-08 16:23 
QuestionMDI Parent Pin
csetopper_bhanu9-Aug-08 9:17
csetopper_bhanu9-Aug-08 9:17 
AnswerRe: MDI Parent Pin
dan!sh 9-Aug-08 9:32
professional dan!sh 9-Aug-08 9:32 
AnswerRe: MDI Parent Pin
dan!sh 9-Aug-08 9:36
professional dan!sh 9-Aug-08 9:36 
QuestionMDI Parent Pin
csetopper_bhanu9-Aug-08 9:08
csetopper_bhanu9-Aug-08 9:08 
AnswerRe: MDI Parent Pin
dan!sh 9-Aug-08 9:37
professional dan!sh 9-Aug-08 9:37 
AnswerRe: MDI Parent Pin
Gareth H9-Aug-08 21:28
Gareth H9-Aug-08 21:28 
Questionright click for multi shapes on picturBox Pin
Member 47164359-Aug-08 7:55
Member 47164359-Aug-08 7:55 
AnswerRe: right click for multi shapes on picturBox Pin
Christian Graus9-Aug-08 16:24
protectorChristian Graus9-Aug-08 16:24 
QuestionHow to access the explicit interface implementation of a base class from a dervied class ? Pin
MarkPhB9-Aug-08 6:05
MarkPhB9-Aug-08 6:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.