Trying out Mercury with some sample app .net console samples.
Unknown type error occurs using friend interface as a method argument as below
Public Module Program
-
Private Shared Sub PrintInfo(ByVal item As IInfo)*
-
Console.WriteLine(“Name: {0}, Age {1}”, item.GetName(), item.GetAge())*
-
End Sub*
-
shared Sub Main(args as String())*
-
Dim a As New CA() With {*
-
.Name = "John Doe",*
-
.Age = 35*
-
}*
-
Dim b As New CB() With {*
-
.First = "Jane",*
-
.Last = "Doe",*
-
.PersonsAge = 33*
-
}*
-
PrintInfo(a)*
-
PrintInfo(b)*
-
End Sub*
End Module
Friend Interface IInfo
- Function GetName() As String*
- Function GetAge() As String*
End Interface
Interface implemented by classes CA and CB.
Build 10.0.0.2517. btw : I presume you are aware that new project templates for windows forms and WPF contain Oxygene code in VB files, but I cant get them to work.
I hope this is the correct forum for this topic and thank you for all your excellent work in opening new horizons for VB.
George