Imports System.Collections.Generic
Dim questions As New OrderQuestionCollection()
questions.PrintQuestions()
Public Class CustomQuestionCollection
Public Property Questions As List(Of Question)
Public Sub PrintQuestions()
If Questions IsNot Nothing Then
For Each question In Questions
Console.WriteLine(question.Text)
Console.WriteLine("There are no questions!")
Public Class OrderQuestionCollection
Inherits CustomQuestionCollection
Public Overloads Property Questions As List(Of OrderQuestion)
Questions = New List(Of OrderQuestion)
Questions.Add(New OrderQuestion With {.Text = "test"})
Public Property Id As Integer
Public Property Text As String
Public Property Answer As String
Public Class OrderQuestion
Public Property [ReadOnly] As Boolean