Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
GeneralRe: Microsoft.Office.Interop.Excel problem Pin
michaelgr117-Jun-09 6:45
michaelgr117-Jun-09 6:45 
QuestionInstalling fonts on a Vista Pc Pin
Okultist16-Jun-09 1:55
Okultist16-Jun-09 1:55 
AnswerRe: Installing fonts on a Vista Pc Pin
dan!sh 16-Jun-09 2:24
professional dan!sh 16-Jun-09 2:24 
GeneralRe: Installing fonts on a Vista Pc Pin
Luc Pattyn16-Jun-09 2:54
sitebuilderLuc Pattyn16-Jun-09 2:54 
GeneralRe: Installing fonts on a Vista Pc Pin
dan!sh 16-Jun-09 3:35
professional dan!sh 16-Jun-09 3:35 
GeneralRe: Installing fonts on a Vista Pc Pin
Okultist16-Jun-09 3:43
Okultist16-Jun-09 3:43 
GeneralRe: Installing fonts on a Vista Pc Pin
dan!sh 16-Jun-09 5:25
professional dan!sh 16-Jun-09 5:25 
GeneralRe: Installing fonts on a Vista Pc Pin
Okultist16-Jun-09 3:40
Okultist16-Jun-09 3:40 
AnswerRe: Installing fonts on a Vista Pc Pin
Okultist17-Jun-09 2:46
Okultist17-Jun-09 2:46 
QuestionState Maintenance Pin
ashajahanmca16-Jun-09 1:44
ashajahanmca16-Jun-09 1:44 
AnswerRe: State Maintenance Pin
Michael Bookatz16-Jun-09 1:50
Michael Bookatz16-Jun-09 1:50 
AnswerRe: State Maintenance Pin
Henry Minute16-Jun-09 1:54
Henry Minute16-Jun-09 1:54 
AnswerRe: State Maintenance Pin
himanshu256116-Jun-09 2:01
himanshu256116-Jun-09 2:01 
GeneralRe: State Maintenance Pin
Henry Minute16-Jun-09 4:39
Henry Minute16-Jun-09 4:39 
Questionhow to access javascript using c# Pin
svt gdwl16-Jun-09 1:19
svt gdwl16-Jun-09 1:19 
Questionweb services Pin
harispa16-Jun-09 1:05
harispa16-Jun-09 1:05 
AnswerRe: web services Pin
Baran M16-Jun-09 1:23
Baran M16-Jun-09 1:23 
AnswerRe: web services Pin
Tom Deketelaere16-Jun-09 1:24
professionalTom Deketelaere16-Jun-09 1:24 
QuestionProblem with while loop and text file Pin
kallileo16-Jun-09 0:56
kallileo16-Jun-09 0:56 
AnswerRe: Problem with while loop and text file [modified] Pin
Luc Pattyn16-Jun-09 1:03
sitebuilderLuc Pattyn16-Jun-09 1:03 
Hi,

your code reads each stream once; i.e. for the first line of the first file, the entire content of the second file is read, then everything comes to a halt since sr2 has reached the end-of-stream condition.

if you want to have all combinations of lines from file1 and file2, then you should:
- either open the second file inside the while loop reading file1 (hence reopening it for every line of file1);
- or reposition sr2 at the beginning over and over again.

BTW:
Your try-finally construct will swallow any exception that may occur. I recommend you add catch(Exception exc) {Console.WriteLine(exc.ToString());} to visualize most problems that may (and sooner or later will) occur.

[CORRECTION]Exceptions don't get swallowed by finally blocks, they survive the try-finally construct and will have to be catched at some outer level [/CORRECTION]

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.

modified on Tuesday, June 16, 2009 8:39 AM

GeneralRe: Problem with while loop and text file Pin
OriginalGriff16-Jun-09 1:11
mveOriginalGriff16-Jun-09 1:11 
GeneralRe: Problem with while loop and text file Pin
Le centriste16-Jun-09 2:18
Le centriste16-Jun-09 2:18 
GeneralRe: Problem with while loop and text file Pin
Luc Pattyn16-Jun-09 2:42
sitebuilderLuc Pattyn16-Jun-09 2:42 
GeneralRe: Problem with while loop and text file Pin
kallileo16-Jun-09 2:46
kallileo16-Jun-09 2:46 
QuestionMultiple user accessing single DB Pin
Hum Dum16-Jun-09 0:50
Hum Dum16-Jun-09 0:50 

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.