Click here to Skip to main content
15,911,531 members
Home / Discussions / C#
   

C#

 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak20-Jan-09 5:21
ortaparmak20-Jan-09 5:21 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
moon_stick20-Jan-09 5:28
moon_stick20-Jan-09 5:28 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak20-Jan-09 5:42
ortaparmak20-Jan-09 5:42 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak21-Jan-09 10:29
ortaparmak21-Jan-09 10:29 
QuestionValidating a "Text" file Pin
dwolver20-Jan-09 4:14
dwolver20-Jan-09 4:14 
AnswerRe: Validating a "Text" file Pin
musefan20-Jan-09 4:23
musefan20-Jan-09 4:23 
GeneralRe: Validating a "Text" file Pin
EliottA20-Jan-09 4:24
EliottA20-Jan-09 4:24 
GeneralRe: Validating a "Text" file Pin
musefan20-Jan-09 4:36
musefan20-Jan-09 4:36 
No time to wait for replies lol. If you want some code that works for my understanding of your question then read on. otherwise, if i misunderstood your needs ignore the rest. but it may help others who pull up your post.


System.IO.StreamReader sr = new System.IO.StreamReader("C:\\TargetFile.txt");

int b = sr.BaseStream.ReadByte();

while(b != -1)
{
char c = (char)b;

if(c != '0' && c != '1')
//DO ERROR HANDLING HERE

b = sr.BaseStream.ReadByte();
}

sr.Close();


Of course you could just test the byte against ASCII equivalent without char conversion

And remember you may need to handler other characters such as 'new lines' etc.
AnswerRe: Validating a "Text" file Pin
EliottA20-Jan-09 4:23
EliottA20-Jan-09 4:23 
GeneralRe: Validating a "Text" file Pin
dwolver20-Jan-09 4:32
dwolver20-Jan-09 4:32 
GeneralRe: Validating a "Text" file Pin
EliottA20-Jan-09 4:35
EliottA20-Jan-09 4:35 
GeneralRe: Validating a "Text" file Pin
musefan20-Jan-09 4:39
musefan20-Jan-09 4:39 
GeneralRe: Validating a "Text" file Pin
Guffa20-Jan-09 6:11
Guffa20-Jan-09 6:11 
AnswerRe: Validating a "Text" file [modified] Pin
Luc Pattyn20-Jan-09 4:38
sitebuilderLuc Pattyn20-Jan-09 4:38 
GeneralRe: Validating a "Text" file Pin
dwolver20-Jan-09 4:42
dwolver20-Jan-09 4:42 
AnswerRe: Validating a "Text" file Pin
Luc Pattyn20-Jan-09 5:09
sitebuilderLuc Pattyn20-Jan-09 5:09 
GeneralRe: Validating a "Text" file Pin
EliottA20-Jan-09 5:53
EliottA20-Jan-09 5:53 
GeneralRe: Validating a "Text" file Pin
PIEBALDconsult21-Jan-09 5:58
mvePIEBALDconsult21-Jan-09 5:58 
AnswerRe: Validating a "Text" file Pin
Luc Pattyn21-Jan-09 6:10
sitebuilderLuc Pattyn21-Jan-09 6:10 
GeneralRe: Validating a "Text" file Pin
PIEBALDconsult21-Jan-09 6:51
mvePIEBALDconsult21-Jan-09 6:51 
Question[newbie] 'System.Data.SqlDbType.BigInt' is a 'field' but is used like a 'type' Pin
jon-8020-Jan-09 3:51
professionaljon-8020-Jan-09 3:51 
AnswerRe: [newbie] 'System.Data.SqlDbType.BigInt' is a 'field' but is used like a 'type' Pin
Christian Graus20-Jan-09 4:09
protectorChristian Graus20-Jan-09 4:09 
Questionmeasure performance of function Pin
George_George20-Jan-09 1:58
George_George20-Jan-09 1:58 
AnswerRe: measure performance of function Pin
Dave Kreskowiak20-Jan-09 2:05
mveDave Kreskowiak20-Jan-09 2:05 
GeneralRe: measure performance of function Pin
George_George20-Jan-09 2:46
George_George20-Jan-09 2:46 

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.