inaccessible interface?

My class (THPMSBridge.RealtimeNetworkState) implements a interface "INetworkState" in another assembly, and this causes a exception during runtime:

A first chance exception of type 'System.TypeLoadException' occurred in
System.Windows.Forms.dll

Additional information: Type 'THPMSBridge.RealtimeNetworkState' from assembly
'THPMSBridge, Version=1.0.50721.0, Culture=neutral, PublicKeyToken=null' is
attempting to implement an inaccessible interface.

Could anyone explain what this exception is? How to fix it?

Thanks!

[555 byte] By [LeiJiang] at [2008-2-27]
# 1
Your interface is probably not marked as a public interface.

public interface Foo
{
...
}

DanVallejo at 2007-9-9 > top of Msdn Tech,.NET Development,Common Language Runtime...
# 2
Thanks!

I later found it is the reason. However, why the code get compiled?

LeiJiang at 2007-9-9 > top of Msdn Tech,.NET Development,Common Language Runtime...

.NET Development

Site Classified