Click here to Skip to main content
16,014,765 members
Home / Discussions / C#
   

C#

 
QuestionHow To: network sniffing on Vista? Pin
Super Lloyd19-Jun-08 13:54
Super Lloyd19-Jun-08 13:54 
AnswerRe: How To: network sniffing on Vista? Pin
Mark Churchill19-Jun-08 18:22
Mark Churchill19-Jun-08 18:22 
GeneralRe: How To: network sniffing on Vista? Pin
Super Lloyd19-Jun-08 18:36
Super Lloyd19-Jun-08 18:36 
AnswerRe: How To: network sniffing on Vista? Pin
leppie20-Jun-08 0:41
leppie20-Jun-08 0:41 
GeneralRe: How To: network sniffing on Vista? Pin
Super Lloyd20-Jun-08 4:39
Super Lloyd20-Jun-08 4:39 
AnswerRe: How To: network sniffing on Vista? Pin
Spacix One20-Jun-08 2:50
Spacix One20-Jun-08 2:50 
QuestionPrint Pin
netJP12L19-Jun-08 11:04
netJP12L19-Jun-08 11:04 
Questionswitch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 10:59
TheFoZ19-Jun-08 10:59 
Hi
Please accept my apologies if this sound silly but I cannot find a solution to this.

I have a project I am converting to C# from VB. In VB I would do this.
Select Case Asc(UCase(Mid(strName, intPos, 1)))
    Case 48 To 57
        Let strNameSearch = strNameSearch & UCase(Mid(strName, intPos, 1))
    Case 65 To 90, 193, 201, 205, 211, 218, 225, 233, 237, 243, 250 
        'some other code here
End Select      


I have looked on the interweb and the only solution I have found is to use the switch statement like this
switch (statement that returns the ASCII value of the text)
{
    case 48:
    case 49:
    case 50:
 //and so on
}


This does seem a bit convoluted so is there an easy way like with the To statement in vb? (a link to some advanced switching will be greatly received) How do I get the ASC value of a character. Alot of people are saying to do Convert.ToInt32(....) but this brings me back errors as I am using a for loop to iterate through a substring.

Your help is greatly appreciated.

The FoZ

AnswerRe: switch statemeent. Am I missing someting Pin
Judah Gabriel Himango19-Jun-08 11:09
sponsorJudah Gabriel Himango19-Jun-08 11:09 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 11:18
TheFoZ19-Jun-08 11:18 
GeneralRe: switch statemeent. Am I missing someting Pin
Judah Gabriel Himango19-Jun-08 11:50
sponsorJudah Gabriel Himango19-Jun-08 11:50 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 12:45
TheFoZ19-Jun-08 12:45 
AnswerRe: switch statemeent. Am I missing someting Pin
Guffa19-Jun-08 13:24
Guffa19-Jun-08 13:24 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 13:49
TheFoZ19-Jun-08 13:49 
GeneralRe: switch statemeent. Am I missing someting Pin
Ed.Poore19-Jun-08 14:12
Ed.Poore19-Jun-08 14:12 
GeneralOT: About string.Empty Pin
Guffa19-Jun-08 14:32
Guffa19-Jun-08 14:32 
GeneralRe: OT: About string.Empty Pin
Ed.Poore19-Jun-08 21:15
Ed.Poore19-Jun-08 21:15 
GeneralRe: OT: About string.Empty Pin
Scott Dorman21-Jun-08 1:58
professionalScott Dorman21-Jun-08 1:58 
GeneralRe: OT: About string.Empty Pin
Scott Dorman21-Jun-08 1:58
professionalScott Dorman21-Jun-08 1:58 
GeneralRe: switch statemeent. Am I missing someting Pin
PIEBALDconsult19-Jun-08 15:15
mvePIEBALDconsult19-Jun-08 15:15 
GeneralRe: switch statemeent. Am I missing someting Pin
Ed.Poore19-Jun-08 21:21
Ed.Poore19-Jun-08 21:21 
AnswerRe: switch statemeent. Am I missing someting Pin
Guffa21-Jun-08 6:35
Guffa21-Jun-08 6:35 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 22:13
TheFoZ19-Jun-08 22:13 
GeneralRe: switch statemeent. Am I missing someting Pin
Ed.Poore19-Jun-08 22:36
Ed.Poore19-Jun-08 22:36 
GeneralRe: switch statemeent. Am I missing someting Pin
Guffa19-Jun-08 14:15
Guffa19-Jun-08 14:15 

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.