How can I cast a list in VB

Asked

Viewed 62 times

0

I’m starting to program in Visual Basic and I need to do cast of a list of objects.

Below is an example of a class containing a list of products in one of its attributes.

Public Class KnackParsedJSon
    Public total_pages As Integer
    Public current_page As Integer
    Public total_records As Integer
    Public records As New List(Of Product)
End Class

I would like to store in the list records objects of the type Supplier?

  • your code is only for Visual Basic 6?

  • for all versions of VB

  • This is very incomplete. Post the code of variables, constants and class properties Supplier and of Product

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.