Click here to Skip to main content
15,893,668 members
Home / Discussions / C#
   

C#

 
GeneralRe: Files Pin
clint19824-Apr-06 22:27
clint19824-Apr-06 22:27 
AnswerRe: Files Pin
Navaneeth.K.N4-Apr-06 20:44
Navaneeth.K.N4-Apr-06 20:44 
GeneralRe: Files Pin
Guffa4-Apr-06 23:24
Guffa4-Apr-06 23:24 
GeneralRe: Files Pin
clint19824-Apr-06 23:30
clint19824-Apr-06 23:30 
AnswerRe: Files Pin
Guffa5-Apr-06 5:23
Guffa5-Apr-06 5:23 
GeneralRe: Files Pin
simran0075-Apr-06 19:24
simran0075-Apr-06 19:24 
GeneralRe: Files Pin
Guffa6-Apr-06 1:45
Guffa6-Apr-06 1:45 
AnswerRe: Files Pin
Guffa4-Apr-06 20:56
Guffa4-Apr-06 20:56 
I'm not sure how the StreamReader uses it's buffer, but if it has one I hardly think that it's not using it.

Anyway, the file system also buffers file reads. A file is read in blocks of at least one cluster at a time, and a cluster is normally something like 4 kiB or 8 kiB.

Furthermore the disk may also use read-ahead, which means that when you read a sector, a certain number of sectors following it will also be read and stored in the drive cache. That means that when the file system requests the next sector, it will already be in the cache, and no physical read is needed.

So unless you have extremely long lines in your file, the disk will not be accessed for every call to ReadLine. There are several layers of buffering and caching that are quite efficient, so unless you run into performance problems, you hardly need to worry about it.

---
b { font-weight: normal; }

Questionvery very urgent please help me in c# datagrid Pin
Abdul_Rahman4-Apr-06 18:22
Abdul_Rahman4-Apr-06 18:22 
AnswerRe: very very urgent please help me in c# datagrid Pin
krishna194-Apr-06 21:47
krishna194-Apr-06 21:47 
QuestionMerge INI Pin
picasso24-Apr-06 17:57
picasso24-Apr-06 17:57 
AnswerRe: Merge INI Pin
Expert Coming4-Apr-06 20:37
Expert Coming4-Apr-06 20:37 
AnswerRe: Merge INI Pin
scoroop4-Apr-06 22:22
scoroop4-Apr-06 22:22 
GeneralRe: Merge INI Pin
picasso25-Apr-06 11:10
picasso25-Apr-06 11:10 
QuestionHow to convert from decimal to binary Pin
shdelpiero4-Apr-06 14:51
shdelpiero4-Apr-06 14:51 
AnswerRe: How to convert from decimal to binary Pin
Christian Graus4-Apr-06 19:02
protectorChristian Graus4-Apr-06 19:02 
GeneralRe: How to convert from decimal to binary Pin
Sebastian Schneider5-Apr-06 0:00
Sebastian Schneider5-Apr-06 0:00 
QuestionFilter DataGrid Pin
cppdotnet4-Apr-06 13:15
cppdotnet4-Apr-06 13:15 
QuestionSorting Datagrid Pin
cppdotnet4-Apr-06 13:06
cppdotnet4-Apr-06 13:06 
QuestionHow to get total no of records from a typed Dataset Pin
Herhighness4-Apr-06 11:02
Herhighness4-Apr-06 11:02 
AnswerRe: How to get total no of records from a typed Dataset Pin
Alvaro Mendez4-Apr-06 12:08
Alvaro Mendez4-Apr-06 12:08 
Questioncreate SPSS file (.sav) Pin
ap_sa4-Apr-06 9:54
ap_sa4-Apr-06 9:54 
QuestionUpdate comboBox Control Pin
Cubzfan4-Apr-06 9:44
Cubzfan4-Apr-06 9:44 
AnswerRe: Update comboBox Control Pin
Judah Gabriel Himango4-Apr-06 10:51
sponsorJudah Gabriel Himango4-Apr-06 10:51 
AnswerRe: Update comboBox Control Pin
Richard Parsons4-Apr-06 11:08
Richard Parsons4-Apr-06 11:08 

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.