在 .NET 4 控制台应用程序和 Silverlight 4 应用程序中,以下返回false
:
Uri.IsWellFormedUriString http://msdn.microsoft.com/en-us/library/system.uri.iswellformeduristring%28v=VS.100%29.aspx("/test", UriKind.Absolute)
但 Windows Phone 应用程序(使用 2011 年 6 月 29 日发布的 SDK 7.1 Beta 2 的 7.0 或 7.1)中的相同调用返回true
.
其他人可以证实这一点吗?这是WP7的bug吗?
Update
我将此报告为错误微软连接 https://connect.microsoft.com/VisualStudio/feedback/details/683289/uri-iswellformeduristring-returns-different-value-on-wp-7-vs-sl-4-or-net-4今天收到一条更新,它已被关闭为“不会修复”。这对我来说并不重要,但我想我会添加此更新仅供参考。
之后文档 http://msdn.microsoft.com/en-us/library/system.uri.iswellformeduristring%28v=VS.95%29.aspx这是一个错误:
如果字符串的格式符合 RFC 3986,则为 true 的布尔值;否则是假的。
And the RFC 3986 https://www.rfc-editor.org/rfc/rfc3986#section-4.3 says:
绝对 URI = 方案 ":" 层次部分 [ "?"询问 ]
所以最好提交这个错误微软连接 https://connect.microsoft.com/在 VS 下引用手机开发工具的工具版本。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)