Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: Converter converter = new Converter(delegate(int value) Pin
harold aptroot25-Jun-09 4:59
harold aptroot25-Jun-09 4:59 
JokeRe: Converter converter = new Converter(delegate(int value) Pin
musefan25-Jun-09 4:48
musefan25-Jun-09 4:48 
AnswerRe: Converter converter = new Converter(delegate(int value) Pin
J4amieC25-Jun-09 4:58
J4amieC25-Jun-09 4:58 
JokeRe: Converter converter = new Converter(delegate(int value) Pin
Not Active25-Jun-09 5:10
mentorNot Active25-Jun-09 5:10 
JokeRe: Converter converter = new Converter(delegate(int value) Pin
J4amieC25-Jun-09 5:15
J4amieC25-Jun-09 5:15 
GeneralRe: Converter converter = new Converter(delegate(int value) Pin
Dave Kreskowiak25-Jun-09 6:08
mveDave Kreskowiak25-Jun-09 6:08 
GeneralRe: Converter converter = new Converter(delegate(int value) Pin
Rajesh R Subramanian25-Jun-09 9:31
professionalRajesh R Subramanian25-Jun-09 9:31 
GeneralRe: Converter converter = new Converter(delegate(int value) Pin
Angel Romero25-Jun-09 5:19
Angel Romero25-Jun-09 5:19 
QuestionRe-Question Pin
Dong Cher, Ryu25-Jun-09 3:56
Dong Cher, Ryu25-Jun-09 3:56 
AnswerRe: Re-Question Pin
Luc Pattyn25-Jun-09 4:06
sitebuilderLuc Pattyn25-Jun-09 4:06 
AnswerRe: Re-Question Pin
EliottA25-Jun-09 4:09
EliottA25-Jun-09 4:09 
QuestionActive directory Users Pin
caiena25-Jun-09 3:51
caiena25-Jun-09 3:51 
AnswerRe: Active directory Users Pin
Manas Bhardwaj25-Jun-09 4:18
professionalManas Bhardwaj25-Jun-09 4:18 
QuestionDynamic crystal reports Pin
rajeshkiduvath25-Jun-09 3:48
rajeshkiduvath25-Jun-09 3:48 
AnswerRe: Dynamic crystal reports Pin
EliottA25-Jun-09 4:47
EliottA25-Jun-09 4:47 
AnswerRe: Dynamic crystal reports Pin
Behrooz_cs27-Jun-09 21:31
Behrooz_cs27-Jun-09 21:31 
Questionhow to fasten the datareader and insert process Pin
Ersan Ercek25-Jun-09 3:12
Ersan Ercek25-Jun-09 3:12 
AnswerRe: how to fasten the datareader and insert process Pin
harold aptroot25-Jun-09 3:52
harold aptroot25-Jun-09 3:52 
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 
At the risk of starting a flamewar how is

public string RemoveLetters(string original)<br/>{<br/>    System.Text.StringBuilder sb = new System.Text.StringBuilder();<br/>    for(int i = 0; i < original.Length; i++)<br/>    {<br/>      if(!char.IsLetter(original, i))<br/>         sb.Append(original[i]);<br/>    }<br/>    return sb.ToString();<br/>}

Simpler than:
Regex.Replace("your String", "[A-Za-z]", "");


Despite the common belief that string builders are better, they are inefficient for most applications, it'd be much quicker cycling through an array of chars (a-z) (or their equivalient integer values & converting) and removing them in a loop.

The regex will allow other caracters he'll probably need to remove to be added with ease.

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.