Debug class

This assignment tests your ability to use the Debug class to display output in the Debug window.

1. What would be displayed in the Output window if the user clicked Button1 while running this program:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
   For a = 1 To 5
      Debug.WriteLine(a)
   Next
End Sub

What would be displayed if Debug.Writeline(a) were replaced with:

2. Debug.Writeline(a - 3)

3. Debug.Write(a)

4. Debug.WritelineIf(a < 2, a)

5. Debug.Writeline("Hello Pal" & " " & Cstr(a + 10))

6. Debug.WriteLine(a = 3)

My advice would be to first answer these, then check your results by running the examples.


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.