Click here to Skip to main content
15,907,492 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reflection Question Pin
led mike11-Mar-08 5:34
led mike11-Mar-08 5:34 
GeneralRe: Reflection Question Pin
Martin#11-Mar-08 5:39
Martin#11-Mar-08 5:39 
GeneralRe: Reflection Question Pin
led mike11-Mar-08 5:44
led mike11-Mar-08 5:44 
QuestionRe: Reflection Question [modified] Pin
Paw Jershauge11-Mar-08 5:20
Paw Jershauge11-Mar-08 5:20 
GeneralRe: Reflection Question Pin
led mike11-Mar-08 5:31
led mike11-Mar-08 5:31 
GeneralRe: Reflection Question Pin
Paw Jershauge11-Mar-08 5:48
Paw Jershauge11-Mar-08 5:48 
GeneralRe: Reflection Question Pin
Paw Jershauge11-Mar-08 6:17
Paw Jershauge11-Mar-08 6:17 
GeneralPlease help me convert the C# code to VB.Net Pin
Support12311-Mar-08 3:55
Support12311-Mar-08 3:55 
Hi,

I beleive this sample code is in C#:

string cleanString = String.Empty;<br />
Regex reg = new Regex("[A-Z]|[a-z]");<br />
MatchCollection coll = reg.Matches(<MyStringGoesHere>);<br />
for(int i = 0; i < coll.Count; i++)<br />
{<br />
cleanString = cleanString + coll[i].Value;<br />
}


See, i want to remove all characters that do not fall in the A-Z or a-z OR 0-9 category AND replace it with a space...
example test123t3er = test t er

Am i wrong in saying that the Regex reg = Regex("[A-Z]|[a-z]") CAN IT BE: Regex reg = Regex("[A-Z]|[a-z]|[0-9]") ???

AND the cleanString = cleanString + coll[i].Value;
CAN I DO A TEST: IF(coll[i].Value == String.Empty) THEN cleanString = cleanString + " "; ELSE cleanString = cleanString + coll[i].Value ???? - in this way i add space if the character is not in the above category????

So please help me convert the very top section of code and i will build from there...

Thank you in advance...

"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison

AnswerRe: Please help me convert the C# code to VB.Net Pin
Paw Jershauge11-Mar-08 4:02
Paw Jershauge11-Mar-08 4:02 
GeneralRe: Please help me convert the C# code to VB.Net Pin
Support12311-Mar-08 4:08
Support12311-Mar-08 4:08 
GeneralRe: Please help me convert the C# code to VB.Net Pin
Paw Jershauge11-Mar-08 4:22
Paw Jershauge11-Mar-08 4:22 
GeneralRe: Please help me convert the C# code to VB.Net Pin
ChrisKo11-Mar-08 8:09
ChrisKo11-Mar-08 8:09 
GeneralWindows Application Security using SQL 2005 Pin
Illegal Operation11-Mar-08 2:47
Illegal Operation11-Mar-08 2:47 
GeneralRe: Windows Application Security using SQL 2005 Pin
led mike11-Mar-08 4:44
led mike11-Mar-08 4:44 
QuestionGetFiles() Problem Pin
climbah11-Mar-08 2:44
climbah11-Mar-08 2:44 
GeneralRe: GetFiles() Problem Pin
FerencTheFifth11-Mar-08 2:58
FerencTheFifth11-Mar-08 2:58 
GeneralRe: GetFiles() Problem Pin
Luc Pattyn11-Mar-08 3:39
sitebuilderLuc Pattyn11-Mar-08 3:39 
GeneralRe: GetFiles() Problem Pin
climbah11-Mar-08 22:07
climbah11-Mar-08 22:07 
GeneralEnterprise Library and C#... Pin
Illegal Operation11-Mar-08 0:21
Illegal Operation11-Mar-08 0:21 
GeneralRe: Enterprise Library and C#... Pin
led mike11-Mar-08 4:41
led mike11-Mar-08 4:41 
Generalpixel C# Pin
Jeeva Jose10-Mar-08 23:44
Jeeva Jose10-Mar-08 23:44 
GeneralRe: pixel C# Pin
Bekjong10-Mar-08 23:50
Bekjong10-Mar-08 23:50 
GeneralRe: pixel C# Pin
Jeeva Jose11-Mar-08 0:00
Jeeva Jose11-Mar-08 0:00 
GeneralRe: pixel C# Pin
Bekjong11-Mar-08 0:03
Bekjong11-Mar-08 0:03 
GeneralRe: pixel C# Pin
phannon8611-Mar-08 0:07
professionalphannon8611-Mar-08 0:07 

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.