好吧,我有这样的代码:访问项目
URLs.Add(new URL(str.URL, str.Title, browser));
,这是URL类:
public class URL
{
string url;
string title;
string browser;
public URL(string url, string title, string browser)
{
this.url = url;
this.title = title;
this.browser = browser;
}
}
现在,我该如何访问URL标题..?
即,URL的属性[0] ...?当我打印URLs [0] .ToString时,它只给了我Namespace.URL。
如何打印URL类中的变量?
你没有给予足够的信息,以便能够回答这个问题。什么样的对象是“URL”? – freefaller
@freefaller,他在标题中表示 - 列表。 – walther