Assigning objects

  1. What is the data type of the Font property of a Label?
  2. In our greeting example, could the new Font have been assigned directly to the Font property of the label without using the object variables smallFont and largeFont?
  3. The following program displays the word "hoho." What size will it be?
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim a As Font = New Font("rage Italic", 10)
       Dim b As Font = New Font("rage Italic", 25)
       Dim c As Font
       c = b
       b = a
       a = c
       Label1.Font = a
       Label1.Text = "hoho"
    End Sub
    
  4. Is the Font constructor overloaded? Explain your answer.

Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.