Click here to Skip to main content
15,918,404 members
Home / Discussions / C#
   

C#

 
AnswerRe: About Screen Saver Pin

MmM.net</

8-Jan-06 1:17

MmM.net</

8-Jan-06 1:17 
QuestionConvert from C# windows application to Web Application Pin

MmM.net</

8-Jan-06 0:52

MmM.net</

8-Jan-06 0:52 
AnswerRe: Convert from C# windows application to Web Application Pin
Colin Angus Mackay8-Jan-06 1:49
Colin Angus Mackay8-Jan-06 1:49 
QuestionWin32 SetCapture() CallBack Help Pin
redfish347-Jan-06 22:48
redfish347-Jan-06 22:48 
AnswerRe: Win32 SetCapture() CallBack Help Pin
S. Senthil Kumar8-Jan-06 2:15
S. Senthil Kumar8-Jan-06 2:15 
GeneralRe: Win32 SetCapture() CallBack Help Pin
redfish348-Jan-06 10:27
redfish348-Jan-06 10:27 
Questionc# Memory Error Pin
tareqGamal7-Jan-06 18:27
tareqGamal7-Jan-06 18:27 
AnswerRe: c# Memory Error Pin
Judah Gabriel Himango7-Jan-06 22:00
sponsorJudah Gabriel Himango7-Jan-06 22:00 
First question, why are you doing int.Parse(Sfs.Position.ToString())? Sfs.Position returns a long. Basically what you're doing is taking a long, creating a string representation of that long (which allocates memory on the heap), then parsing that string into an integer. Terribly inefficient. Use

(int)Sfs.Position


to cast it to an integer instead.

The reason for your error is because the second parameter passed to Sfs.Read and to Dfs.Write is the offset into the readFile array, NOT into the FileStream. Pass zero instead:

Sfs.Read(readFile, 0, bufferSize);
Dfs.Write(readFile, 0, bufferSize);

GeneralRe: c# Memory Error Pin
tareqGamal8-Jan-06 10:44
tareqGamal8-Jan-06 10:44 
AnswerRe: c# Memory Error Pin
Guffa8-Jan-06 11:59
Guffa8-Jan-06 11:59 
GeneralRe: c# Memory Error Pin
tareqGamal8-Jan-06 23:58
tareqGamal8-Jan-06 23:58 
QuestionOnly one usage of each socket address (protocol/network address/port) is normally permitted Pin
dwark1067-Jan-06 15:14
dwark1067-Jan-06 15:14 
AnswerRe: Only one usage of each socket address (protocol/network address/port) is normally permitted Pin
Judah Gabriel Himango7-Jan-06 21:38
sponsorJudah Gabriel Himango7-Jan-06 21:38 
AnswerRe: Only one usage of each socket address (protocol/network address/port) is normally permitted Pin
S. Akif Kamal7-Jan-06 22:09
S. Akif Kamal7-Jan-06 22:09 
AnswerRe: Only one usage of each socket address (protocol/network address/port) is normally permitted Pin
mikailcetinkaya8-Jan-06 2:57
mikailcetinkaya8-Jan-06 2:57 
GeneralRe: Only one usage of each socket address (protocol/network address/port) is normally permitted Pin
dwark1068-Jan-06 7:23
dwark1068-Jan-06 7:23 
Questionthanks guys.... Pin
knight_sky7-Jan-06 14:59
knight_sky7-Jan-06 14:59 
AnswerRe: thanks guys.... Pin
Judah Gabriel Himango7-Jan-06 22:04
sponsorJudah Gabriel Himango7-Jan-06 22:04 
QuestionControls.add() Pin
Ahmad Mahmoud [candseeme]7-Jan-06 11:55
Ahmad Mahmoud [candseeme]7-Jan-06 11:55 
AnswerRe: Controls.add() Pin
Colin Angus Mackay7-Jan-06 13:18
Colin Angus Mackay7-Jan-06 13:18 
AnswerRe: How to keep window displayed - C#? Pin
mikailcetinkaya8-Jan-06 2:42
mikailcetinkaya8-Jan-06 2:42 
QuestionCreateThread Pin
Bassam Saoud7-Jan-06 9:45
Bassam Saoud7-Jan-06 9:45 
AnswerRe: CreateThread Pin
leppie7-Jan-06 10:02
leppie7-Jan-06 10:02 
GeneralRe: CreateThread Pin
Bassam Saoud7-Jan-06 10:18
Bassam Saoud7-Jan-06 10:18 
GeneralRe: CreateThread Pin
Dave Kreskowiak7-Jan-06 13:53
mveDave Kreskowiak7-Jan-06 13:53 

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.