【发布时间】:2017-11-24 09:08:49
【问题描述】:
我不断得到:-
错误 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); } }
}
【问题讨论】:
-
我猜
class Form8和Form8()是公开的,收据没有修饰符或者是internal -
可以出示收据吗?请发布课程。
-
@john 是的 class form8 是公开的
-
@Marcio 跟duplicate 一样。
标签: c# reportviewer