The example below throws an InvalidOperationException, \"Collection was modified; enumeration operation may not execute.\" when executing the code.
var urls
Jon's approach is right; a queue's the right data structure for this kind of application.
Assuming that you'd eventually like your program to terminate, I'd suggest two other things:
string for your URLs, use System.Web.Uri: it provides a canonical string representation of the URL. This will be useful for the second suggestion, which is...