I have a Public Class called “ClientConnection”. Inside that class, I have a Public ReadOnly Property called “FileTransfers(ByVal TransferID)”. The property returns an object of the class “FileTransfer”. All methods in FileTransfer are set to public.
VS is able to discover the methods inside the parent class “ClientConnection”. How would I expose the methods inside the sub-class “FileTransfer” that is returned by the property “FileTransfers(ByVal TransferID)”?
Public Class ClientConnection
'irreverent code removed
Public ReadOnly Property FileTransfers(ByVal TransferID As Integer)
Get
Dim obj As FileTransfer = OngoingFileTransfers(TransferID)
If obj IsNot Nothing Then
Return obj
Else
Return Nothing
End If
End Get
End Property
End Class
Public Class FileTransfer()
Public Sub StartTransfer() '<--- I need this discoverable in VS from ClientConnection's parent
'do some stuff
End Sub
End Class
I understand that this may be difficult to understand. So if you need me to clarify, just ask. Thanks!
I think you just need to indicate what type is returned by your
FileTransfersproperty.Right now, there is no
asclause at the end of the property declaration.This sounds more like a method operation than a property though.