C# Uri 拼接

2022/3/25 1:22:32

本文主要是介绍C# Uri 拼接,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

> Console.WriteLine(new Uri(new Uri("https://www.baidu.com/api"), "/gateway/code"));
https://www.baidu.com/gateway/code
> Console.WriteLine(new Uri(new Uri("https://www.baidu.com/api"), "gateway/code"));
https://www.baidu.com/gateway/code
> Console.WriteLine(new Uri(new Uri("https://www.baidu.com/api/"), "/gateway/code"));
https://www.baidu.com/gateway/code
> Console.WriteLine(new Uri(new Uri("https://www.baidu.com/api/"), "gateway/code"));
https://www.baidu.com/api/gateway/code
> Console.WriteLine(new Uri(new Uri("https://www.baidu.com"), "gateway/code"));
https://www.baidu.com/gateway/code
> Console.WriteLine(new Uri(new Uri("https://www.baidu.com/"), "gateway/code"));
https://www.baidu.com/gateway/code
> Console.WriteLine(new Uri(new Uri("https://www.baidu.com/"), "/gateway/code"));
https://www.baidu.com/gateway/code


这篇关于C# Uri 拼接的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程