Click here to Skip to main content
15,895,656 members
Home / Discussions / C#
   

C#

 
AnswerRe: Parameter not valid?? Pin
CoolASL12-Oct-06 4:47
CoolASL12-Oct-06 4:47 
GeneralRe: Parameter not valid?? Pin
hristo197712-Oct-06 10:35
hristo197712-Oct-06 10:35 
GeneralRe: Parameter not valid?? Pin
CoolASL13-Oct-06 0:02
CoolASL13-Oct-06 0:02 
QuestionWeb Control in C# Pin
CoolASL12-Oct-06 4:33
CoolASL12-Oct-06 4:33 
AnswerRe: Web Control in C# Pin
Christian Graus12-Oct-06 4:49
protectorChristian Graus12-Oct-06 4:49 
GeneralRe: Web Control in C# Pin
CoolASL13-Oct-06 0:01
CoolASL13-Oct-06 0:01 
QuestionCaptain! I think she's leaking memory Pin
sameerhanda12-Oct-06 4:30
sameerhanda12-Oct-06 4:30 
AnswerRe: Captain! I think she's leaking memory Pin
WillemM12-Oct-06 5:46
WillemM12-Oct-06 5:46 
Isn't it possible just use the following code:

using(MemoryStream stream = new MemoryStream()) {<br />
  for(int i= 0; i < totalByteCount; i++) {<br />
    stream.Write(new byte[] { 0 },0,1); //Not sure about this call, haven't got the docs here and I'm too lazy to remember :P<br />
  }<br />
<br />
  stream.Seek(0,...);<br />
}


This simply fills the stream with zeroes and resets the stream to the beginning. This way the capacity is set to the right value automatically, plus the stream is really that size.

-- EDIT:

Hmm, I'm sleeping again Poke tongue | ;-P I tried the code and it seems to me that you are indeed short of memory for this action.

WM.

What about weapons of mass-construction?

AnswerRe: Captain! I think she's leaking memory Pin
Judah Gabriel Himango12-Oct-06 6:05
sponsorJudah Gabriel Himango12-Oct-06 6:05 
QuestionMonitoring scrolling graph Pin
flackjack12-Oct-06 4:25
flackjack12-Oct-06 4:25 
Questionv1.1 equivalent of v2.0's "List" class?? Pin
Goalie3512-Oct-06 4:25
Goalie3512-Oct-06 4:25 
AnswerRe: v1.1 equivalent of v2.0's "List" class?? Pin
ssoffline12-Oct-06 4:36
ssoffline12-Oct-06 4:36 
AnswerRe: v1.1 equivalent of v2.0's "List" class?? Pin
Stefan Troschuetz12-Oct-06 5:04
Stefan Troschuetz12-Oct-06 5:04 
QuestionCan i include a font in my app? Pin
Anthony Mushrow12-Oct-06 4:13
professionalAnthony Mushrow12-Oct-06 4:13 
AnswerRe: Can i include a font in my app? Pin
Jonathan [Darka]12-Oct-06 4:35
professionalJonathan [Darka]12-Oct-06 4:35 
AnswerRe: Can i include a font in my app? Pin
WillemM12-Oct-06 5:51
WillemM12-Oct-06 5:51 
QuestionHow to handle shutdown event Pin
Alper Camel12-Oct-06 4:05
Alper Camel12-Oct-06 4:05 
AnswerRe: How to handle shutdown event Pin
Stefan Troschuetz12-Oct-06 5:11
Stefan Troschuetz12-Oct-06 5:11 
QuestionEnd of thread Pin
Parshant Verma12-Oct-06 3:14
Parshant Verma12-Oct-06 3:14 
AnswerRe: End of thread Pin
Paul Brower12-Oct-06 3:27
Paul Brower12-Oct-06 3:27 
QuestionRe: End of thread Pin
Parshant Verma12-Oct-06 3:32
Parshant Verma12-Oct-06 3:32 
AnswerRe: End of thread Pin
asator12-Oct-06 6:32
asator12-Oct-06 6:32 
QuestionList of applications Pin
-Yoyosh-12-Oct-06 2:16
-Yoyosh-12-Oct-06 2:16 
AnswerRe: List of applications Pin
Alper Camel12-Oct-06 2:26
Alper Camel12-Oct-06 2:26 
QuestionEMF file getting deleted after creation Pin
cppandey2312-Oct-06 1:36
cppandey2312-Oct-06 1:36 

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.