cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
in c# i can write this lovely thing:
Can someone write that in VB (without making a mess)? Read it carefully, because it's not as easy as you think!![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
VB.NET:
String s;
for(int linesRead=0, s=fileReader.ReadLine(); s!=null; linesRead+=1, s=fileReader.ReadLine() ){
if(s.length != 100){
MessageBox.Show("Line is not right length - ignoring!")
continue;
}
if(s.startsWith("HEADER"))
continue; //ignore header lines
if(some other test){
MessageBox.show("some other test failed too, progressing to next line");
continue;
}
databaseEngineHelper.InsertALine(s);
}
Can someone write that in VB (without making a mess)? Read it carefully, because it's not as easy as you think!