Hello there,
I have found a tutorial to call a C# DLL from VB6, but my C# class uses inheritance. And then my problem comes in..
Visual Basic code to call the C# class from the DLL:
The above code works when the C# class doesn't use a superclass:
But doesn't work if I inherit a superclass:
Is there a solution that I can use a C# DLL that inherit from a super class in Visual Basic 6?
I have found a tutorial to call a C# DLL from VB6, but my C# class uses inheritance. And then my problem comes in..
Visual Basic code to call the C# class from the DLL:
Code:
[COLOR=#0000a0]Dim[/COLOR] obj [COLOR=#0000a0]As[/COLOR] Object
[COLOR=#0000a0]Set[/COLOR] obj = New TestProject.ChildClass
The above code works when the C# class doesn't use a superclass:
Code:
[COLOR=#0000ff]using[/COLOR] System;
[COLOR=#0000ff]using[/COLOR] System.Collections.Generic;
[COLOR=#0000ff]using[/COLOR] System.Linq;
[COLOR=#0000ff]using[/COLOR] System.Text;
[COLOR=#0000ff]namespace[/COLOR] TestClass
{
[COLOR=#0000ff]public class[/COLOR] [COLOR=#2b91af]SingleClass[/COLOR]
{
}
}
But doesn't work if I inherit a superclass:
Code:
[COLOR=#0000ff]using[/COLOR] System;
[COLOR=#0000ff]using[/COLOR] System.Collections.Generic;
[COLOR=#0000ff]using[/COLOR] System.Linq;
[COLOR=#0000ff]using[/COLOR] System.Text;
[COLOR=#0000ff]namespace[/COLOR] TestClass
{
[COLOR=#0000ff]public class[/COLOR] [COLOR=#2b91af]ChildClass : ParentClass[/COLOR] {
}
}
Is there a solution that I can use a C# DLL that inherit from a super class in Visual Basic 6?