Rosetta Code/Count examples: Difference between revisions
→{{header|C sharp|C#}}: Added some error handling and URL Encode the task page name so it can handle e.g. A+B
m (/mw/ => /w/) |
(→{{header|C sharp|C#}}: Added some error handling and URL Encode the task page name so it can handle e.g. A+B) |
||
Line 402:
foreach (string task in tasknames) {
string content = GetSourceCodeFromPage(WebUtility.UrlEncode(task), wc);
Task t = new Task(task, count);
Console.WriteLine(t);
tasks.Add(t);
}
catch (Exception ex) {
Console.WriteLine("**** Unable to get task \"" + task + "\": " + ex.Message);
}
}
|