-1
我有一个带有接口的密封类。无法创建密封类的对象
[Serializable]
public sealed class OrderProcessor : IDisposable
{.....}
这是具有接口实现的独立类。
[ComVisible(true)]
public interface IDisposable
{
void Dispose();
}
我想在另一个类中创建对象。
OrderProcessor processor = new OrderProcessor();
在创建对象时它给出错误。
错误:
The type initializer for 'OrderProcessor' threw an exception.
内部异常:
Value cannot be null.\r\nParameter name: assemblyString
注:assemblystring没有当存在于我的项目。
我该如何做到这一点。
什么是错误? – Habib
在你的问题中包含构造函数和错误信息。 –
刚才我编辑了错误描述的代码。 –