我们如果想在项目中使用vs自带的本地报表rdlc(控件ReportViewer)就需要引入两个DLL:Microsoft.ReportViewer.Common.dll,Microsoft.ReportViewer.WinForms.dll,
这两个DLL关联中有一个奇怪的问题,Microsoft.ReportViewer.WinForms.dll要引用DLL:Microsoft.ReportViewer.Common.dll。但是在Microsoft.ReportViewer.WinForms.dll中有一个LocalReport类,大致定义如下:
namespace Microsoft.Reporting.WinForms
{
[Serializable]
public sealed class LocalReport : Report, ISerializable, IDisposable
{
public LocalReport() : this(new ControlService(new StandalonePreviewStore()))
{
}
。。。。。
StandalonePreviewStore这个类是来自Microsoft.ReportViewer.Common.dll中,但是它是这么定义的:
namespace Microsoft.ReportingServices
{
[Serializable]
internal sealed class StandalonePreviewStore : PreviewStore
{
public StandalonePreviewStore()
{
}
。。。。。。
我的问题是既然StandalonePreviewStore 是internal sealed的,为什么不在同一个namespace和Assembly中居然可以访问?
yanglei