错误;由于其保护级别,“DASAG.XtraReport1.xrChart1”无法访问 [英] Error ;'DASAG.XtraReport1.xrChart1' is inaccessible due to its protection level

查看:69
本文介绍了错误;由于其保护级别,“DASAG.XtraReport1.xrChart1”无法访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

private void button1_Click(object sender, EventArgs e)
        {
                       XtraReport1 report = new XtraReport1();    

((IChartContainer)report.xrChart1).Chart.Assign(((IChartContainer)chartControl1).Chart);


        }

推荐答案

您需要从按钮中删除私人访问修饰符点击事件处理程序



私有访问修饰符只允许在声明的类中使用该项。我建议将其改为受保护。
You need to remove the "private" access modifier from your button click event handler.

The "private" access modifier only allows that item to be used within the class it is declared. I would suggest changing that to "protected".


这篇关于错误;由于其保护级别,“DASAG.XtraReport1.xrChart1”无法访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆