开发者

Is there a URI equivalent of Path.PathSeparator in .NET?

开发者 https://www.devze.com 2023-03-19 16:08 出处:网络
I need to build up a URI path from string values and I\'m combining them together.Is there a URI constant for the / separator value as there is fo开发者_JS百科r Path.PathSeparator?Apparently there isn

I need to build up a URI path from string values and I'm combining them together. Is there a URI constant for the / separator value as there is fo开发者_JS百科r Path.PathSeparator?


Apparently there isn't. It's not platform-specific after all and RFC 2396 RFC 3986 specifies that the path separator in URIs is in fact /.

For combining URIs it's probably best to use the Uri(baseUrl, relativeUrl) constructor as suggested in Mike's comment.

0

精彩评论

暂无评论...
验证码 换一张
取 消