String[] / ArrayList Problems (original) (raw)

I've written a class that queries game servers on the on the Quake3 network type, and I've come into a small problem. After you send the status packet to the server, it responds back with one packet, with each part being separated by a line break. (Line 1 = useless start, Line 2 = Server Info, Line 3 = Playerinfo.) After I split it, (using '\n') I can easily access each part, but not in the way I need to. All I need to do is add _Response[1] to the arraylist, but I get an error... heres what I tried.string[] _newResponse = _Response.Spilt('\n');Console.WriteLine(_newResponse[0]); // Outputs the useless packet start
Console.WriteLine(_newResponse[1]); // Outputs all server info
Console.WriteLine(_newResponse[2]); // Outputs all player info

foreach(string Val in _newResponse[1]) // ERROR: Cannot convert type 'char' to 'string'
{
ServerVars.Add(Val);
}

Any ideas? Thanks.

Hello. I want to share with you my open source project. The purpose of my project is to demonstrate my visual filter builder WPF control in use.…

http://jobsattmp.com/new-york/web-development/dba-sql-server-2005_2008-jobs Hey all, I am trying to hire a DBA in NYC that has a background in MS…

I was always impressed by the bing.com image search AJAX. The bit where where more images load as you scroll down the page. Is there an AJAX control…

Hello. I want to share with you my open source project. The purpose of my project is to demonstrate my visual filter builder WPF control in use.…

http://jobsattmp.com/new-york/web-development/dba-sql-server-2005_2008-jobs Hey all, I am trying to hire a DBA in NYC that has a background in MS…

I was always impressed by the bing.com image search AJAX. The bit where where more images load as you scroll down the page. Is there an AJAX control…