【问题标题】:'Payment.GenLedDet' is inaccessible due to its protection level“Payment.GenLedDet”因其保护级别而无法访问
【发布时间】:2012-10-10 17:14:32
【问题描述】:
namespace DataAccessLayer
{
    public class PaymentDAL
    {

     public void InsertInGenLedDet(GenLedDet genLedDet)
        {
        }

}

我的班级 GenLedDet 出现在 Payment namespace

这是我在数据层中的代码 sn-p 并且正在使用此代码。不知道为什么会出现此错误,因为我确实有另一个功能没有显示此类错误

【问题讨论】:

    标签: c# c#-4.0 error-handling data-layer


    【解决方案1】:

    正如错误试图告诉你的那样,你不能创建一个将非公共类作为参数的public 函数。

    【讨论】:

      【解决方案2】:

      代替

      private class GenLedDet {
      

      使用

      public class GenLedDet {
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-02-04
        • 2015-11-13
        • 1970-01-01
        • 2015-09-26
        • 2011-09-01
        • 1970-01-01
        相关资源
        最近更新 更多