G
Guest
OK...I must be missing something...can someone tell me what I'm not doing properly...
First, create an assembly with a single interface in VB.NET as follow
Public Interface IDo
Function Bark(ByVal lVolume As Long) As Strin
End Interfac
Pretty simple..
Now...in a second (C#) assembly...create a class that implements that interface...like so..
using System
using DogInterface
namespace CSImplemete
/// <summary
/// Summary description for Class1
/// </summary
public class Husky : IDo
public string Bark(long lVolume
return "Deep Bark!! at " + lVolume.ToString() + " level"
This is also pretty simple (as you can see...the namespace for the IDog is DogInterface...that is also the name of it's assembly). This all compiles very well...I have a single solution with both projects in it
Now...I create a new assembly...a VB.NET windows application in the same solution that will use that Husky Class. I have referenced the two assemblies from above and placed a single button on the form
In a click event for the test button, I have the following code
Imports CSImplemete
Imports DogInterfac
Public Class Form
Inherits System.Windows.Forms.For
[" Windows Form Designer generated code "
Private Sub cmdBark_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBark.Clic
Dim objDog As CSImplemeter.Husk
End Su
End Clas
The problem is that I get an error on the line of code that dimension the objDog. The squiggly line goes under the CSImplementer.Husky and says..
"Reference required to assembly 'DogInterface' containing the implemented interface 'DogInterface.IDog'. Add one to your project.
But...I already added it to the project. Am I missing something here??...or is there a real problem??
BTW...I am using .NET Enterprise Architect version 7
First, create an assembly with a single interface in VB.NET as follow
Public Interface IDo
Function Bark(ByVal lVolume As Long) As Strin
End Interfac
Pretty simple..
Now...in a second (C#) assembly...create a class that implements that interface...like so..
using System
using DogInterface
namespace CSImplemete
/// <summary
/// Summary description for Class1
/// </summary
public class Husky : IDo
public string Bark(long lVolume
return "Deep Bark!! at " + lVolume.ToString() + " level"
This is also pretty simple (as you can see...the namespace for the IDog is DogInterface...that is also the name of it's assembly). This all compiles very well...I have a single solution with both projects in it
Now...I create a new assembly...a VB.NET windows application in the same solution that will use that Husky Class. I have referenced the two assemblies from above and placed a single button on the form
In a click event for the test button, I have the following code
Imports CSImplemete
Imports DogInterfac
Public Class Form
Inherits System.Windows.Forms.For
[" Windows Form Designer generated code "
Private Sub cmdBark_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBark.Clic
Dim objDog As CSImplemeter.Husk
End Su
End Clas
The problem is that I get an error on the line of code that dimension the objDog. The squiggly line goes under the CSImplementer.Husky and says..
"Reference required to assembly 'DogInterface' containing the implemented interface 'DogInterface.IDog'. Add one to your project.
But...I already added it to the project. Am I missing something here??...or is there a real problem??
BTW...I am using .NET Enterprise Architect version 7