Click here to Skip to main content
15,912,082 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to customize a window Pin
Judah Gabriel Himango18-Mar-05 9:40
sponsorJudah Gabriel Himango18-Mar-05 9:40 
AnswerRe: how to customize a window Pin
MoustafaS18-Mar-05 12:26
MoustafaS18-Mar-05 12:26 
GeneralStatic Values Pin
MrEyes18-Mar-05 7:20
MrEyes18-Mar-05 7:20 
GeneralRe: Static Values Pin
Colin Angus Mackay18-Mar-05 7:27
Colin Angus Mackay18-Mar-05 7:27 
GeneralRe: Static Values Pin
Ravindra Sadaphule18-Mar-05 11:43
Ravindra Sadaphule18-Mar-05 11:43 
Generalmouse drag over problem Pin
ppp00118-Mar-05 5:11
ppp00118-Mar-05 5:11 
GeneralRe: mouse drag over problem Pin
Judah Gabriel Himango18-Mar-05 7:22
sponsorJudah Gabriel Himango18-Mar-05 7:22 
GeneralMemory optimisation Pin
PaleyX18-Mar-05 5:10
PaleyX18-Mar-05 5:10 
I have a routine which reads a header record from a file, that header record tells how many subsequent records to read, each record having another header which says how long that record is in bytes.

Is it more efficient to allocate an array of (say) 10,000 bytes at the beginning of the loop which process the records then use:

BinaryReader.Read(buffer,0,reclength);

or is it better to just allocate the bytes required on the fly:

byte[] buffer = BinaryReader.ReadBytes(recLength);

For this example the recLength will never exceed 10,000 but could be anything between 1 and 10,000 - the loop can require between 40 and 200 iterations.
GeneralRe: Memory optimisation Pin
Andy Brummer18-Mar-05 5:46
sitebuilderAndy Brummer18-Mar-05 5:46 
GeneralRe: Memory optimisation Pin
ACorbs19-Mar-05 11:40
ACorbs19-Mar-05 11:40 
GeneralGacUtil and RegAsm Pin
ppp00118-Mar-05 4:57
ppp00118-Mar-05 4:57 
GeneralRe: GacUtil and RegAsm Pin
Judah Gabriel Himango18-Mar-05 5:28
sponsorJudah Gabriel Himango18-Mar-05 5:28 
GeneralRe: GacUtil and RegAsm Pin
Mike Dimmick18-Mar-05 8:57
Mike Dimmick18-Mar-05 8:57 
GeneralMac address Pin
Member 178719018-Mar-05 3:54
Member 178719018-Mar-05 3:54 
GeneralRe: Mac address Pin
felopater18-Mar-05 15:13
felopater18-Mar-05 15:13 
GeneralRe: Mac address Pin
afinnell20-Mar-05 17:02
afinnell20-Mar-05 17:02 
GeneralPolicy not being applied to reference at this time Pin
Guillermo Jimenez18-Mar-05 3:47
Guillermo Jimenez18-Mar-05 3:47 
GeneralRe: Policy not being applied to reference at this time Pin
Member 9878981-Jul-10 12:26
Member 9878981-Jul-10 12:26 
Generaldraw on transparent control over a mediaplayer Pin
spAAwn18-Mar-05 2:57
spAAwn18-Mar-05 2:57 
GeneralRe: draw on transparent control over a mediaplayer Pin
MoustafaS18-Mar-05 12:35
MoustafaS18-Mar-05 12:35 
GeneralRe: draw on transparent control over a mediaplayer Pin
spAAwn18-Mar-05 12:44
spAAwn18-Mar-05 12:44 
GeneralRe: draw on transparent control over a mediaplayer Pin
MoustafaS18-Mar-05 14:13
MoustafaS18-Mar-05 14:13 
GeneralRe: draw on transparent control over a mediaplayer Pin
spAAwn18-Mar-05 14:28
spAAwn18-Mar-05 14:28 
GeneralRe: draw on transparent control over a mediaplayer Pin
MoustafaS19-Mar-05 6:48
MoustafaS19-Mar-05 6:48 
GeneralRe: draw on transparent control over a mediaplayer Pin
Dave Kreskowiak18-Mar-05 16:33
mveDave Kreskowiak18-Mar-05 16:33 

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.