Imagine I have class like this :
Class A
Public Function Some(str As String) As String
Return "Some " + str
End Function
End Class
I have consuming code like this :
Public Sub Foo()
Dim thisWorks = New With {.prop = "thing"}
Dim thisDoesntWork = New inherits A with { .prop = Some("thing") }
End Sub
I'm trying to create an anonymous type with inheritance so that I can use the methods within. Is this possible ?
Use case : I'm trying to create a class that has methods like Select, From etc. that would help in cleaner query construction. In the consuming code, I would just create an anonymous type inheriting from the class and use the methods.