G
Guest
I've built a simple Interface in VB.NET - other VB.NET projects can reference
and use this interface just fine:
Public Interface IC4IPlugin
Enum TerminateReason
IC4IClosing
WindowsSessionEnding
Other
End Enum
ReadOnly Property PluginName() As String
Function Initialize(ByVal host As IC4IHost, ByVal startForm As
System.Windows.Forms.Form) As Boolean
Function Terminate(ByVal reason As TerminateReason) As Boolean
Function SetUserCredentials() As Boolean
Event PluginClosing(ByVal sender As Object, ByVal e As EventArgs)
Event PluginException(ByVal sender As Object, ByVal e As EventArgs)
Event PluginLogRequest(ByVal sender As Object, ByVal e As EventArgs)
Event PluginClassificationChange(ByVal sender As Object, ByVal e As
EventArgs)
End Interface
So far so good... until you try to implement this interface via C# and run
into this error:
The type or namespace name 'PluginClassificationChangeEventHandler' could
not be found (are you missing a using directive or an assembly reference?)
I get one of those errors for each of the events defined in the interface.
Obviously I have checked that 1) The .DLL containing the interface is
referenced in the project.
What am I missing here? Is there some kind of incompatibility between the
languages that I'm not aware of? I realize that C# (insofar as the code is
concerned) handles events differently - is this a part of the situation?
If any of you have any ideas on what might be the issue - that would be
appreciated.
Thanks,
Chris
and use this interface just fine:
Public Interface IC4IPlugin
Enum TerminateReason
IC4IClosing
WindowsSessionEnding
Other
End Enum
ReadOnly Property PluginName() As String
Function Initialize(ByVal host As IC4IHost, ByVal startForm As
System.Windows.Forms.Form) As Boolean
Function Terminate(ByVal reason As TerminateReason) As Boolean
Function SetUserCredentials() As Boolean
Event PluginClosing(ByVal sender As Object, ByVal e As EventArgs)
Event PluginException(ByVal sender As Object, ByVal e As EventArgs)
Event PluginLogRequest(ByVal sender As Object, ByVal e As EventArgs)
Event PluginClassificationChange(ByVal sender As Object, ByVal e As
EventArgs)
End Interface
So far so good... until you try to implement this interface via C# and run
into this error:
The type or namespace name 'PluginClassificationChangeEventHandler' could
not be found (are you missing a using directive or an assembly reference?)
I get one of those errors for each of the events defined in the interface.
Obviously I have checked that 1) The .DLL containing the interface is
referenced in the project.
What am I missing here? Is there some kind of incompatibility between the
languages that I'm not aware of? I realize that C# (insofar as the code is
concerned) handles events differently - is this a part of the situation?
If any of you have any ideas on what might be the issue - that would be
appreciated.
Thanks,
Chris