I have a VB.NET class library project. It has a reference to some legacy library with GuiComponent
Public Function findById(id As String) As GuiComponent
Return session.FindById(id)
End Function
In a new C# project, I want to call this function and I don't want to reference the whole legacy library for it. So I wrap it with dynamic
((dynamic)sth.findById("someId")).select
Is there a way to return a dynamic type in VB.NET?
Public Function findById(id As String) As Dynamic 'something like this doesn't work
Return session.FindById(id)
End Function
C# equivalent
public dynamic findById(string id) {
return session.FindById(id);
}
And for sure I don't want to turn off Option Strict
for the entire project.