Click here to Skip to main content
15,901,373 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRemove Similar Lines Pin
vijay24827-May-09 1:23
vijay24827-May-09 1:23 
AnswerRe: Remove Similar Lines Pin
riced7-May-09 2:16
riced7-May-09 2:16 
GeneralMessage Closed Pin
7-May-09 2:28
vijay24827-May-09 2:28 
GeneralRe: Remove Similar Lines Pin
riced7-May-09 6:52
riced7-May-09 6:52 
GeneralMessage Closed Pin
10-May-09 21:43
vijay248210-May-09 21:43 
GeneralRe: Remove Similar Lines Pin
riced11-May-09 2:28
riced11-May-09 2:28 
GeneralMessage Closed Pin
11-May-09 2:54
vijay248211-May-09 2:54 
GeneralRe: Remove Similar Lines Pin
riced11-May-09 3:06
riced11-May-09 3:06 
I did point this out when I said that your code relied on two assumptions (one being that similar lines are together when the example shows this is not the case).
There's a problem in the logic you describe since you would need to wind the input file back to line 4. Can't be done without closing and reopening the file and reading through from the start ignoring lines until you get to line 4.
You need to read the file into a list: either sorting it after reading the whole file, or checking for matches as each line is read.
I suppose you could use your logic if you read the file into an array of strings and dealt with it that way.

Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis

GeneralMessage Closed Pin
11-May-09 3:43
vijay248211-May-09 3:43 
GeneralRe: Remove Similar Lines Pin
riced11-May-09 5:32
riced11-May-09 5:32 
Questioncreate process Pin
hrishiS7-May-09 1:15
hrishiS7-May-09 1:15 
AnswerRe: create process Pin
Eddy Vluggen7-May-09 1:29
professionalEddy Vluggen7-May-09 1:29 
GeneralRe: create process Pin
hrishiS7-May-09 1:39
hrishiS7-May-09 1:39 
AnswerRe: create process Pin
Eddy Vluggen7-May-09 8:34
professionalEddy Vluggen7-May-09 8:34 
AnswerRe: create process Pin
Dave Kreskowiak7-May-09 5:09
mveDave Kreskowiak7-May-09 5:09 
GeneralRe: create process Pin
hrishiS7-May-09 22:25
hrishiS7-May-09 22:25 
GeneralRe: create process Pin
Dave Kreskowiak8-May-09 1:19
mveDave Kreskowiak8-May-09 1:19 
QuestionInet Contol in visual Basic Pin
Devkranth Kishore Vanja7-May-09 0:56
Devkranth Kishore Vanja7-May-09 0:56 
AnswerRe: Inet Contol in visual Basic Pin
Dave Kreskowiak7-May-09 4:59
mveDave Kreskowiak7-May-09 4:59 
AnswerRe: Inet Contol in visual Basic Pin
riced7-May-09 6:24
riced7-May-09 6:24 
QuestionSearch files Pin
M.kohulan6-May-09 22:57
M.kohulan6-May-09 22:57 
AnswerRe: Search files Pin
Tom Deketelaere6-May-09 23:18
professionalTom Deketelaere6-May-09 23:18 
QuestionSet Folder Name as File Name Pin
vijay24826-May-09 22:44
vijay24826-May-09 22:44 
AnswerRe: Set Folder Name as File Name Pin
dan!sh 6-May-09 23:03
professional dan!sh 6-May-09 23:03 
AnswerRe: Set Folder Name as File Name Pin
riced7-May-09 1:02
riced7-May-09 1:02 

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.