Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
OriginalGriff23-Dec-13 4:12
mveOriginalGriff23-Dec-13 4:12 
QuestionRe: Large text file(1.5 gb) reading using Background worker Pin
Sampath Sridhar23-Dec-13 21:48
Sampath Sridhar23-Dec-13 21:48 
AnswerRe: Large text file(1.5 gb) reading using Background worker Pin
OriginalGriff24-Dec-13 0:58
mveOriginalGriff24-Dec-13 0:58 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
Arjun Mourya24-Dec-13 2:07
Arjun Mourya24-Dec-13 2:07 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
Sampath Sridhar24-Dec-13 6:32
Sampath Sridhar24-Dec-13 6:32 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
OriginalGriff24-Dec-13 7:35
mveOriginalGriff24-Dec-13 7:35 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
Sampath Sridhar24-Dec-13 19:18
Sampath Sridhar24-Dec-13 19:18 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
Arjun Mourya27-Dec-13 1:54
Arjun Mourya27-Dec-13 1:54 
Hi,

Thanks for the post. Its reading real fast but I am getting an error "Cannot read from a closed TextReader".

C#
string origPath = @"D:\Temp\MyHugeText.txt";
string inPath = @"D:\Temp\MyHugeTextIn.txt";
string notInPath = @"D:\Temp\MyHugeTextOut.txt";
 
var lines = File.ReadLines(origPath);
var isIn = lines.Where(l => l.Contains("raise"));
var notIn = lines.Except(isIn);
File.WriteAllLines(inPath, isIn);
File.WriteAllLines(notInPath, notIn);// I am receiving the error here

BR,
Arjun

GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
OriginalGriff27-Dec-13 2:12
mveOriginalGriff27-Dec-13 2:12 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
Arjun Mourya29-Dec-13 18:10
Arjun Mourya29-Dec-13 18:10 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
Arjun Mourya24-Dec-13 0:23
Arjun Mourya24-Dec-13 0:23 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
OriginalGriff24-Dec-13 0:33
mveOriginalGriff24-Dec-13 0:33 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
harold aptroot24-Dec-13 1:01
harold aptroot24-Dec-13 1:01 
GeneralRe: Large text file(1.5 gb) reading using Background worker Pin
OriginalGriff24-Dec-13 1:12
mveOriginalGriff24-Dec-13 1:12 
QuestionXtraReport vs RDLC Pin
Jassim Rahma21-Dec-13 23:43
Jassim Rahma21-Dec-13 23:43 
AnswerRe: XtraReport vs RDLC Pin
Pete O'Hanlon22-Dec-13 1:31
mvePete O'Hanlon22-Dec-13 1:31 
AnswerRe: XtraReport vs RDLC Pin
Eddy Vluggen23-Dec-13 7:30
professionalEddy Vluggen23-Dec-13 7:30 
QuestionGridview with Faced filters Pin
lucian Gore21-Dec-13 14:35
lucian Gore21-Dec-13 14:35 
QuestionScroll into a Adobe Reader using buttons c# Pin
alfie.max1521-Dec-13 8:26
alfie.max1521-Dec-13 8:26 
AnswerRe: Scroll into a Adobe Reader using buttons c# Pin
BillWoodruff21-Dec-13 14:22
professionalBillWoodruff21-Dec-13 14:22 
GeneralRe: Scroll into a Adobe Reader using buttons c# Pin
alfie.max1521-Dec-13 17:52
alfie.max1521-Dec-13 17:52 
Questionenumerators Pin
gianfrancoguzzo21-Dec-13 4:08
gianfrancoguzzo21-Dec-13 4:08 
GeneralRe: enumerators Pin
harold aptroot21-Dec-13 4:09
harold aptroot21-Dec-13 4:09 
GeneralRe: enumerators Pin
gianfrancoguzzo21-Dec-13 4:17
gianfrancoguzzo21-Dec-13 4:17 
GeneralRe: enumerators Pin
harold aptroot21-Dec-13 4:29
harold aptroot21-Dec-13 4:29 

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.