Constructing new objects during execution
Refering to the example used in our random number note:
Private rnGenerator As Random = New Random()
Private Sub btn01_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn01.Click
lbl01.Text = CStr(rnGenerator.NextDouble)
End Sub
Private Sub btn510_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn510.Click
lbl510.Text = CStr(rnGenerator.Next(5, 11))
End Sub
Which of the following are true and false?
- rnGenerator is a class
- rnGenerator is a method
- rnGenerator is an object
- Random is a class
- Random is a method
- Random is an object
- NextDouble is a class
- NextDouble is a method
- NextDouble is an object
- New is a class
- New is a method
- New is an object