我在集成这个极其出色的解决方案时遇到了麻烦 enter link description here在我将同时读取/写入数据的 winform 应用程序中。我有编译错误:
第一:错误 CS0262“客户端”的部分声明具有冲突的可访问性修饰符
第二:错误 CS0535 'Client' does not implement interface member 'IDisposable.Dispose()'
在这部分代码中,它是红色高亮的:
public sealed partial class Client : IDisposable
最佳答案
第一个错误是因为您的 Client
类具有可访问性不同的 Partial
类。例如如果你有以下内容,你会得到同样的错误:
public partial class MyClassName
{
//rest of code
}
和
protected partial class MyClassName
{
//rest of code
}
类在同一个命名空间中。它们应该都是 public
或都是 protected
。
关于c# - WinForms 中的部分类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37258711/