好吧,我有這樣的代碼:訪問項目
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