Click here to Skip to main content
15,901,284 members
Home / Discussions / C#
   

C#

 
QuestionCheck if frame in webclient is done loading Pin
Member 441789215-May-09 4:25
Member 441789215-May-09 4:25 
Questionposting data to remote URL using WebBrowser Pin
shabya15-May-09 2:49
shabya15-May-09 2:49 
QuestionConvert EBCDIC to ASCII and vice versa Pin
deep715-May-09 2:15
deep715-May-09 2:15 
AnswerRe: Convert EBCDIC to ASCII and vice versa Pin
OriginalGriff15-May-09 2:23
mveOriginalGriff15-May-09 2:23 
GeneralRe: Convert EBCDIC to ASCII and vice versa Pin
deep715-May-09 2:39
deep715-May-09 2:39 
GeneralRe: Convert EBCDIC to ASCII and vice versa Pin
Alan Balkany15-May-09 3:31
Alan Balkany15-May-09 3:31 
AnswerRe: Convert EBCDIC to ASCII and vice versa Pin
Scott Barbour15-May-09 9:59
Scott Barbour15-May-09 9:59 
GeneralRe: Convert EBCDIC to ASCII and vice versa Pin
ishtine188-Jan-10 19:04
ishtine188-Jan-10 19:04 
GeneralRe: Convert EBCDIC to ASCII and vice versa Pin
frank_a3208-Feb-11 11:41
frank_a3208-Feb-11 11:41 
QuestionDatetime picker Pin
KIDYA15-May-09 2:07
KIDYA15-May-09 2:07 
AnswerRe: Datetime picker Pin
Eddy Vluggen15-May-09 2:47
professionalEddy Vluggen15-May-09 2:47 
AnswerRe: Datetime picker Pin
DaveyM6915-May-09 5:27
professionalDaveyM6915-May-09 5:27 
QuestionHow can I optimize this code Pin
MumbleB15-May-09 1:51
MumbleB15-May-09 1:51 
AnswerRe: How can I optimize this code Pin
Tom Deketelaere15-May-09 2:03
professionalTom Deketelaere15-May-09 2:03 
AnswerRe: How can I optimize this code [modified] Pin
fly90415-May-09 2:18
fly90415-May-09 2:18 
Rather than going through the file line by line could you not just search for the index of the word and check if it's right or not (Seeing as you know exactly where everything should be if your using substrings).

StreamReader sr = new StreamReader(fileNot);
string entireFileString = sr.ReadToEnd();
sr.Close();
sr.Dispose();

int location;
while((location = entireFileString.IndexOf(oldhid)) >= 0)
{
    //Found
}

entireFileString = string.Empty;


Don't forget to Dispose() to clear up memory.

My failometer is detecting vast quantities of FAIL!

"Its SQL - hardly programming..." (Caslen)

modified on Friday, May 15, 2009 8:34 AM

AnswerRe: How can I optimize this code Pin
Luc Pattyn15-May-09 3:16
sitebuilderLuc Pattyn15-May-09 3:16 
GeneralRe: How can I optimize this code Pin
Nagy Vilmos15-May-09 3:57
professionalNagy Vilmos15-May-09 3:57 
GeneralRe: How can I optimize this code Pin
Luc Pattyn15-May-09 4:02
sitebuilderLuc Pattyn15-May-09 4:02 
GeneralRe: How can I optimize this code Pin
Nagy Vilmos15-May-09 4:09
professionalNagy Vilmos15-May-09 4:09 
GeneralRe: How can I optimize this code Pin
Luc Pattyn15-May-09 4:23
sitebuilderLuc Pattyn15-May-09 4:23 
GeneralRe: How can I optimize this code Pin
Nagy Vilmos15-May-09 4:27
professionalNagy Vilmos15-May-09 4:27 
GeneralRe: How can I optimize this code Pin
MumbleB15-May-09 23:28
MumbleB15-May-09 23:28 
GeneralRe: How can I optimize this code Pin
Luc Pattyn16-May-09 1:08
sitebuilderLuc Pattyn16-May-09 1:08 
GeneralRe: How can I optimize this code Pin
MumbleB16-May-09 5:55
MumbleB16-May-09 5:55 
GeneralRe: How can I optimize this code Pin
Luc Pattyn16-May-09 6:54
sitebuilderLuc Pattyn16-May-09 6:54 

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.