【发布时间】:2015-05-08 18:29:57
【问题描述】:
我正在使用这个代码块:
if (!Uri.TryCreate("http://www-.ageofautism.com/2010/01/wakefields-science-proven-valid-again-in-new-study-that-replicates-findings.html", UriKind.Absolute, out url) || url.Host == string.Empty)
throw new InvalidUrlException(inputUrl);
Uri.TryCreate 函数返回 true,而不是 false。但是该 URL 已损坏,因为:"www-" 不是有效前缀。
谁能解释一下?
【问题讨论】: