I have a solution with multiple projects, some of the projects are written in VB, some in C#. I am wondering if there's a way to use interfaces and/or enums written in VB in C# classes? My C# code below doesn't compile, however I am able to see the interface in intellisense.
VB Code:
Namespace A
Public Inteface IHandler
Function Handle() As HandlerResult
End Interface
Public Enum HandlerResult
Success = 1
Fail = 0
End Enum
End Namespace
C# Code:
using A;
namespace B
{
public class MyHandler : IHandler
{
public HandlerResult Handle(){
return HandlerResult.Success;
}
}
}
P.S It's a console/service application, not ASP.Net (where I know it's doable).
UPD: Sorry guys, was missing a reference to the project with the interface. It's fixed now. I think the thing that in VB projects references are done slightly different than in C# confused me.