Bug in WP 7 implementation of Uri.IsWellFormedUriString?

*爱你&永不变心* 提交于 2020-06-14 04:10:11

问题


In a .NET 4 console application, and a Silverlight 4 application, the following returns false:

Uri.IsWellFormedUriString("/test", UriKind.Absolute)

but the same call in a Windows Phone app (7.0 or 7.1 using SDK 7.1 Beta 2 published 6/29/11) returns true.

Can anyone else confirm this? Is this a bug in WP7?

Update

I reported this as a bug on Microsoft Connect and received an update today that it has been closed as "Wont' Fix". This doesn't matter to me but I thought I would add this update just as an FYI.


回答1:


After the documentation its a bug:

A Boolean value that is true if the string was well-formed in accordance with RFC 3986; else false.

And the RFC 3986 says:

absolute-URI = scheme ":" hier-part [ "?" query ]

So better submit this bug on Microsoft Connect under VS referencing the Tooling Version for phone development tools.



来源:https://stackoverflow.com/questions/6977325/bug-in-wp-7-implementation-of-uri-iswellformeduristring

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!