[英]Error 1 Inconsistent accessibility: parameter type
我不斷得到:
錯誤1不一致的可訪問性:參數類型'System.Collections.Generic.List'的訪問比方法少
我不知道怎么了,請幫忙
List<receipt> _list;
string _total, _cash, _change, _date;
public Form8(List<receipt> datasource, string total, string cash, string change, string date)
{
InitializeComponent();
_list = datasource;
_total = total;
_cash = cash;
_change = change;
_date = date;
}
class receipt
{
public int id { get; set; }
public string productname { get; set; }
public string type { get; set; }
public int quantity { get; set; }
public double price { get; set; }
public string Total { get { return string.Format("{0}kz", price * quantity); } }
}
只要公開收據即可。 如果調用者甚至無法訪問回執,則無法在form8構造函數中請求這些列表。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.