Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with p/invoking iphlpapi.dll Pin
Luc Pattyn3-Feb-12 15:40
sitebuilderLuc Pattyn3-Feb-12 15:40 
GeneralRe: Help with p/invoking iphlpapi.dll Pin
jschell4-Feb-12 9:47
jschell4-Feb-12 9:47 
AnswerRe: Help with p/invoking iphlpapi.dll - Going in circles Pin
CCodeNewbie5-Feb-12 2:05
CCodeNewbie5-Feb-12 2:05 
AnswerRe: Help with p/invoking iphlpapi.dll - Going in circles Pin
Luc Pattyn5-Feb-12 3:25
sitebuilderLuc Pattyn5-Feb-12 3:25 
GeneralRe: Help with p/invoking iphlpapi.dll - Going in circles Pin
CCodeNewbie6-Feb-12 5:57
CCodeNewbie6-Feb-12 5:57 
AnswerRe: Help with NETSTAT output Pin
Luc Pattyn6-Feb-12 6:25
sitebuilderLuc Pattyn6-Feb-12 6:25 
GeneralRe: Help with NETSTAT output Pin
CCodeNewbie6-Feb-12 9:23
CCodeNewbie6-Feb-12 9:23 
AnswerRe: Help with NETSTAT output Pin
Luc Pattyn6-Feb-12 9:55
sitebuilderLuc Pattyn6-Feb-12 9:55 
1.
CCodeNewbie wrote:
Have you tried loading the code into a VS2005 or later console app?

Nope. That is your job. However I can read code and see what it does, and where it is wrong.

2.
I can assure you the white space in NETSTAT's output consists of regular space characters, ASCII 0x20, Unicode 0x0020.
The only surprise you may get, depending on how you do things, is a single unexpected carriage-return character per line (ASCII 0x0D, or '\r'). And that is because on Windows a newline operation may consist of carriagereturn + linefeed, and you might splitting on (and swallowing) linefeeds, leaving the carriage-returns in place.

3.
How many array elements do you expect from the following:
string[] parts="ABBBC".Split('B');

Now check it.
And if you were to replace every B in the above line by a space, would that change anything?

4.
Any idea what the following code does:
string s="some    silly   text   of   arbitrary                                           length";
s=s.Replace("        "," ");
s=s.Replace("    "," ");
s=s.Replace("  "," ");
s=s.Replace("  "," ");
s=s.Replace("  "," ");
s=s.Replace("  "," ");
string[] words=s.Split(' ');

And why the last few Replace statements are there at all?

5.
in
TCP    0.0.0.0:135            SOMENAME:0             LISTENING       1288

which one is the major separator, the colon or the space? work on the major one first.
don't even spend a second of your time on a secondary separator as long as you haven't fully mastered the major separator.

6.
This is my last entry in this thread. Text, explanations and code by far exceed what this little problem warrants already.

Hmmm | :|
Luc Pattyn [My Articles] Nil Volentibus Arduum

Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.

GeneralRe: Help with NETSTAT output Pin
CCodeNewbie6-Feb-12 10:35
CCodeNewbie6-Feb-12 10:35 
QuestionSerialPort.Close() hanging Pin
__John_3-Feb-12 5:13
__John_3-Feb-12 5:13 
AnswerRe: SerialPort.Close() hanging Pin
jschell3-Feb-12 10:57
jschell3-Feb-12 10:57 
GeneralRe: SerialPort.Close() hanging Pin
__John_5-Feb-12 22:20
__John_5-Feb-12 22:20 
QuestionBest method for putting a wait Pin
Subin Mavunkal2-Feb-12 21:08
Subin Mavunkal2-Feb-12 21:08 
AnswerRe: Best method for putting a wait Pin
OriginalGriff2-Feb-12 21:18
mveOriginalGriff2-Feb-12 21:18 
GeneralRe: Best method for putting a wait Pin
Subin Mavunkal2-Feb-12 21:26
Subin Mavunkal2-Feb-12 21:26 
AnswerRe: Best method for putting a wait Pin
OriginalGriff2-Feb-12 21:40
mveOriginalGriff2-Feb-12 21:40 
AnswerRe: Best method for putting a wait Pin
BobJanova3-Feb-12 4:48
BobJanova3-Feb-12 4:48 
AnswerRe: Best method for putting a wait Pin
Eddy Vluggen3-Feb-12 6:22
professionalEddy Vluggen3-Feb-12 6:22 
QuestionPlay DVD and cut a Video in WPF Pin
Alessio Elia2-Feb-12 9:46
Alessio Elia2-Feb-12 9:46 
AnswerRe: Play DVD and cut a Video in WPF Pin
Dean Oliver3-Feb-12 6:52
Dean Oliver3-Feb-12 6:52 
QuestionHow would you store this data (interview question) Pin
SledgeHammer012-Feb-12 8:28
SledgeHammer012-Feb-12 8:28 
AnswerRe: How would you store this data (interview question) Pin
Luc Pattyn2-Feb-12 8:30
sitebuilderLuc Pattyn2-Feb-12 8:30 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 8:32
SledgeHammer012-Feb-12 8:32 
AnswerRe: How would you store this data (interview question) Pin
Luc Pattyn2-Feb-12 8:42
sitebuilderLuc Pattyn2-Feb-12 8:42 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 9:07
SledgeHammer012-Feb-12 9: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.