Click here to Skip to main content
15,921,577 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to fasten the datareader and insert process Pin
Luc Pattyn25-Jun-09 4:08
sitebuilderLuc Pattyn25-Jun-09 4:08 
AnswerRe: how to fasten the datareader and insert process Pin
PIEBALDconsult25-Jun-09 4:47
mvePIEBALDconsult25-Jun-09 4:47 
Questionstring Pin
arkiboys25-Jun-09 3:02
arkiboys25-Jun-09 3:02 
AnswerRe: string Pin
Keith Barrow25-Jun-09 3:08
professionalKeith Barrow25-Jun-09 3:08 
AnswerRe: string Pin
himanshu256125-Jun-09 3:13
himanshu256125-Jun-09 3:13 
AnswerRe: string [modified] PinPopular
musefan25-Jun-09 3:22
musefan25-Jun-09 3:22 
GeneralRe: string Pin
Keith Barrow25-Jun-09 3:37
professionalKeith Barrow25-Jun-09 3:37 
GeneralRe: string Pin
musefan25-Jun-09 4:07
musefan25-Jun-09 4:07 
I didn't say it was simpler, just there is a simple way of doing it yourself.

If you loop the chars you will have to create a new string with each remove anyway. I don't know the exact performance difference so I'm not trying to argue its better in that respect. I just basically like to give answers that show the logic involved (when its a simple task like this), that way people can learn the logic and apply that when 'out the box' functions either are not available or simple don't do exactly what you want.

For example, lets say the OP really wants to do this task over a 1GB file with a background worker. Now obviously you don'd load 1GB into a string, you would do a ReadByte loop or something similar, but my method shows how easy it is to detect if a character is a letter and then progress can be reported after each loop (or 1000 loops etc.)

Don't get me wrong, was not trying to start an argument, both Regex suggestions are perfectly valid - just wanted to give an alternative Wink | ;)

Life goes very fast. Tomorrow, today is already yesterday.

GeneralRe: string Pin
EliottA25-Jun-09 4:08
EliottA25-Jun-09 4:08 
JokeRe: string Pin
J4amieC25-Jun-09 5:11
J4amieC25-Jun-09 5:11 
GeneralRe: string Pin
EliottA25-Jun-09 10:21
EliottA25-Jun-09 10:21 
GeneralRe: string Pin
Luc Pattyn25-Jun-09 12:31
sitebuilderLuc Pattyn25-Jun-09 12:31 
GeneralRe: string Pin
J4amieC25-Jun-09 4:45
J4amieC25-Jun-09 4:45 
GeneralRe: string Pin
musefan25-Jun-09 4:59
musefan25-Jun-09 4:59 
QuestionRouter's bytes transferred so far Pin
Muammar©25-Jun-09 2:58
Muammar©25-Jun-09 2:58 
GeneralRe: Router's bytes transferred so far Pin
harold aptroot25-Jun-09 3:02
harold aptroot25-Jun-09 3:02 
AnswerRe: Router's bytes transferred so far Pin
Rajesh R Subramanian25-Jun-09 3:04
professionalRajesh R Subramanian25-Jun-09 3:04 
AnswerRe: Router's bytes transferred so far Pin
OriginalGriff25-Jun-09 3:06
mveOriginalGriff25-Jun-09 3:06 
Questionopening child window in mdi application. Pin
vinay_K25-Jun-09 2:44
vinay_K25-Jun-09 2:44 
Questiongui problem Pin
Serv-dee25-Jun-09 2:07
Serv-dee25-Jun-09 2:07 
QuestionRe: gui problem Pin
harold aptroot25-Jun-09 2:13
harold aptroot25-Jun-09 2:13 
AnswerRe: gui problem Pin
Rajesh R Subramanian25-Jun-09 2:43
professionalRajesh R Subramanian25-Jun-09 2:43 
AnswerRe: gui problem [modified] Pin
padmanabhan N25-Jun-09 2:14
padmanabhan N25-Jun-09 2:14 
GeneralRe: gui problem Pin
J4amieC25-Jun-09 2:27
J4amieC25-Jun-09 2:27 
AnswerRe: gui problem PinPopular
Pete O'Hanlon25-Jun-09 2:47
mvePete O'Hanlon25-Jun-09 2:47 

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.