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

C#

 
QuestionIndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie4-Apr-12 10:46
CCodeNewbie4-Apr-12 10:46 
AnswerRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Eddy Vluggen4-Apr-12 11:20
professionalEddy Vluggen4-Apr-12 11:20 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie4-Apr-12 11:37
CCodeNewbie4-Apr-12 11:37 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie7-Apr-12 13:41
CCodeNewbie7-Apr-12 13:41 
AnswerRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Eddy Vluggen7-Apr-12 22:21
professionalEddy Vluggen7-Apr-12 22:21 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie8-Apr-12 0:14
CCodeNewbie8-Apr-12 0:14 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Eddy Vluggen8-Apr-12 0:28
professionalEddy Vluggen8-Apr-12 0:28 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie8-Apr-12 1:12
CCodeNewbie8-Apr-12 1:12 
from a cmd-line netstat -ano you can see that the field usually used by "State" tends to be empty under the UDP protocol unless there is some stream coming in in which case it will show "Established" or whatever. Because I am writing the values to a SQL table I need to keep s[6] in the PID column.

Quote:
Could it be that it's reading a lot of empty lines?
don't think so, usually it works fine until it hits a null/empty value somewhere in the s[] array. What would be ideal is a way of saying:
if (s[whatever].isNullorEmpty){s[whatever] = "0";}
AnswerRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Eddy Vluggen8-Apr-12 1:48
professionalEddy Vluggen8-Apr-12 1:48 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie8-Apr-12 2:09
CCodeNewbie8-Apr-12 2:09 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie8-Apr-12 8:21
CCodeNewbie8-Apr-12 8:21 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Eddy Vluggen8-Apr-12 8:29
professionalEddy Vluggen8-Apr-12 8:29 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie8-Apr-12 8:33
CCodeNewbie8-Apr-12 8:33 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Eddy Vluggen8-Apr-12 8:56
professionalEddy Vluggen8-Apr-12 8:56 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie8-Apr-12 8:58
CCodeNewbie8-Apr-12 8:58 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process - update Pin
CCodeNewbie8-Apr-12 0:30
CCodeNewbie8-Apr-12 0:30 
AnswerRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Luc Pattyn4-Apr-12 11:38
sitebuilderLuc Pattyn4-Apr-12 11:38 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
CCodeNewbie4-Apr-12 11:41
CCodeNewbie4-Apr-12 11:41 
GeneralRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
Luc Pattyn4-Apr-12 11:57
sitebuilderLuc Pattyn4-Apr-12 11:57 
AnswerRe: IndexOutOfRangeExceoption while parsing a Netstat process Pin
V.4-Apr-12 20:39
professionalV.4-Apr-12 20:39 
Questionopen WPF within a WPF Pin
Me kiter4-Apr-12 7:22
Me kiter4-Apr-12 7:22 
QuestionQCrypto Pin
univmalik4-Apr-12 6:40
univmalik4-Apr-12 6:40 
QuestionJson serialization Pin
tfile1014-Apr-12 2:46
tfile1014-Apr-12 2:46 
AnswerRe: Json serialization Pin
Eddy Vluggen4-Apr-12 3:11
professionalEddy Vluggen4-Apr-12 3:11 
QuestionDatabase in P2P LAN chat messanger Pin
Cba12343-Apr-12 20:21
Cba12343-Apr-12 20:21 

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.