下面是我的代碼請解釋什麼是參考cboListType。關鍵字ref在C#中的含義是什麼?
Lists.LoadListTypes(ref cboListType);
public static void LoadListTypes(ref DropDownList dropDown)
{
if (!Util.IsCached(LIST_TYPES))
{
Util.InsertIntoCache(LIST_TYPES, DataAccess.ListListTypes());
}
dropDown.DataSource = (DataTable)Util.GetFromCache(LIST_TYPES);
dropDown.DataBind();
dropDown.Items.Insert(0, new ListItem("", ""));
}
如果我說'對DropDownList對象的引用',這會幫助你嗎? –
您是否想了解ref關鍵字,下拉列表是什麼,或者可能是別的? – jlafay
這是你的代碼,你不知道它是幹什麼的? – Joe