Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 VB.NET 中将 URL 的字符串值转换为类型 URI 的最快方法是什么?
是的。
Dim myUri As New Uri("http://www.contoso.com/")
只需用您的变量替换字符串,就可以了。
只需将字符串传递给构造函数。
Dim url As String = "http://test.com" Dim uri As New Uri(url)