2017-11-24 8 views
0

내가 점점 계속 : -오류 1 일관성 접근성 : 매개 변수 유형

오류 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); } } 



    } 
+0

'클래스 Form8'과'Form8()'이 public이고 영수증에 수식어가 없거나'internal'이라고 추측 할 것입니다. – john

+0

영수증을 보여줄 수 있습니까? 수업을 게시하십시오. – horotab

+1

[매개 변수가 메서드보다 접근하기가 쉽지 않음] (https://stackoverflow.com/questions/9726974/parameter-is-less-accessible-than-method) – john

답변

2

그냥 영수증을 만드십시오. 호출자가 영수증에 액세스 할 수없는 경우 form8 생성자의 목록을 요청할 수 없습니다.

+0

감사합니다! 위선적 인 말을 믿지 않았다. –