Re: Cookie parser help =]
String.Split takes a Char or Char array as a parameter. You are passing a String. Strings are enclosed in double quotes while Chars are enclosed in single quotes.
As for the second issue, you've declared TempHandler as 'int', which is Int32, so why are you converting to Int16, which is 'short'? I would imagine that the actual issue is that GetByIndex returns an Object reference and you're trying to assign it to a String variable. If the underlying object is a string then you should cast it as a string:
Code:
TempVal = (string)colCookies.GetByIndex(TempHandler);
If the underlying object is not a string then a cast will still work but strictly speaking you should convert the object:
Code:
TempVal = colCookies.GetByIndex(TempHandler).ToString();
Re: Cookie parser help =]
So how would I use the split command with strings and not chars? I fixed the colCookies.GetByIndex problem though thanks :)
Re: Cookie parser help =]
You're only splitting on a single character so you don't have to use a string. If you did want to split on a string you could use Regex.Split instead.
Re: Cookie parser help =]
Oh I see thanks I'll try that :)