如何从一个实例化器传递到另一个实例化器?假设我们有这堂课。如何从 foo(string, string) 传递到 foo(Uri)?
public foo
{
string path { get; private set; }
string query { get; private set; }
public foo (Uri someUrl)
{
// ... do stuff here
}
public foo (string path, string query)
{
Uri someUrl = new Uri(String.Concat(path, query);
// ... do stuff here to pass thru to foo(someUrl)
}
}