我是C#的新手,正在努力理解这一点:我正在try 使用.NET6.0URI构造函数之一,即这个构造函数:
Uri(Uri baseUri, string? relativeUri);
个
我的代码如下所示:
string baseUrl = "https://example.com";
string? route = null;
Uri test = new Uri(baseUrl, route);
但我得到了这样的错误:
'route' may be null here.
Argument 2: cannot convert from string to bool