I have the following code
string[] listArray = new string[] {"some list", "Some other list"}
foreach (string s in listArray)
{
SPList listName = rootWeb.Lists[s];
}
Ok that should be enough to see whats going on, basically if i remove iCount from listArray[iCount] and replace it with a value then it works
If not I get the usual Unhandled exception was thrown by the sandboxed code wrappers Execute method which is the error you get when it doesn't work in the Sandbox.
Any help is appreciated Thanks Matt