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

C#

 
GeneralRe: Can it really be true? Pin
James T. Johnson2-Jul-03 23:09
James T. Johnson2-Jul-03 23:09 
GeneralRe: Can it really be true? Pin
Kant3-Jul-03 7:34
Kant3-Jul-03 7:34 
GeneralRe: Can it really be true? Pin
Marc Clifton3-Jul-03 7:37
mvaMarc Clifton3-Jul-03 7:37 
GeneralRe: Can it really be true? Pin
Kant3-Jul-03 8:56
Kant3-Jul-03 8:56 
GeneralFile downloading - web service Pin
jrmcdona2-Jul-03 6:21
jrmcdona2-Jul-03 6:21 
GeneralRe: File downloading - web service Pin
leppie2-Jul-03 7:12
leppie2-Jul-03 7:12 
GeneralRe: File downloading - web service Pin
jrmcdona2-Jul-03 7:19
jrmcdona2-Jul-03 7:19 
GeneralFile I/O fun with binary files Pin
BrewCrew2-Jul-03 5:27
BrewCrew2-Jul-03 5:27 
As a newbie C# project, I'm trying to read a file consisting of phonelog data that was generated by my PBX and format it to be easy to do reporting. It's a binary file with each record separated by a null character (hex 00), and each record is 80 bytes long. I'd appreciate a little nudge in the right direction to get me started. The code below will let me look at the integer representation of each character, but what I really want to do is read each record in until end of file.

StreamReader re = File.OpenText("C:\\smdrdata.rec");
int input;
int count = 0;
while ((input = re.Read()) != 0)
{
//do something
}
re.Close();

Here's an example of the file data, sort of. I don't know how to show the nulls. I can email the actual file if anyone is kind enough to help.


TLC 7748 94210 467-4284 17:17 00:00:35 $00.00
TLC 7654 94209 530-1586 17:17 00:01:10 $00.00
* IN 7640 94212 803-793-7266 7640 17:16 00:02:58 $00.00
IN 7653 94215 7653 17:19 00:00:12 $00.00
IN 2500 94212 7748 17:20 00:00:06 $00.00

Thanks muchly,
BrewCrew

GeneralRe: File I/O fun with binary files Pin
BrewCrew7-Jul-03 4:02
BrewCrew7-Jul-03 4:02 
GeneralAccessing an inbox in the SMTP service Pin
Johan Danforth2-Jul-03 5:11
Johan Danforth2-Jul-03 5:11 
GeneralRe: Accessing an inbox in the SMTP service Pin
lykac2-Jul-03 12:37
lykac2-Jul-03 12:37 
GeneralRe: Accessing an inbox in the SMTP service Pin
Johan Danforth2-Jul-03 20:33
Johan Danforth2-Jul-03 20:33 
QuestionHow to tell which row of DataGrid has been selected? Pin
Khang Nguyen2-Jul-03 4:38
Khang Nguyen2-Jul-03 4:38 
QuestionHOW to set html element's VALUE. Pin
Asim N.2-Jul-03 0:47
Asim N.2-Jul-03 0:47 
AnswerRe: HOW to set html element's VALUE. Pin
dynamic2-Jul-03 1:46
dynamic2-Jul-03 1:46 
GeneralProblem with DllImport Pin
jtmtv181-Jul-03 19:52
jtmtv181-Jul-03 19:52 
GeneralRe: Problem with DllImport Pin
Nathan Blomquist2-Jul-03 5:01
Nathan Blomquist2-Jul-03 5:01 
GeneralACCESSING IIS Pin
Asim N.1-Jul-03 19:39
Asim N.1-Jul-03 19:39 
GeneralRe: ACCESSING IIS Pin
Matt Newman2-Jul-03 5:55
Matt Newman2-Jul-03 5:55 
Generaladding image in SubItems of ListView Pin
azusakt1-Jul-03 16:49
azusakt1-Jul-03 16:49 
QuestionC# equivalent of CMap? Pin
mcgahanfl1-Jul-03 13:36
mcgahanfl1-Jul-03 13:36 
AnswerRe: C# equivalent of CMap? Pin
Wesner Moise1-Jul-03 14:00
Wesner Moise1-Jul-03 14:00 
QuestionHow to set column widths of DataGrid, Anyone? Pin
Khang Nguyen1-Jul-03 13:28
Khang Nguyen1-Jul-03 13:28 
AnswerRe: How to set column widths of DataGrid, Anyone? Pin
Anonymous2-Jul-03 9:09
Anonymous2-Jul-03 9:09 
GeneralRe: How to set column widths of DataGrid, Anyone? Pin
Khang Nguyen2-Jul-03 12:24
Khang Nguyen2-Jul-03 12:24 

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.