title: Create a right triangle with loop in Visual Basic
body: <p>I tried to solve the Visual Basic assignment in dart and I was able to using this :</p>
  <p><a href="https://i.stack.imgur.com/UidML.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UidML.png" alt="enter image description here" /></a></p>
  <p>I don't know if that's the best way to do it though. In Visual Studio I don't know what commands or methods that can help me do this and this is the result there.</p>
  <pre class="lang-vb prettyprint-override"><code>Public Class Form1
      Dim input As Integer
      
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
          Me.Text = &quot;Nested Loops&quot;
      End Sub
      
      Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label.Click
      End Sub
      
      Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles InputTextBox.TextChanged
          input = Val(InputTextBox.Text)
      End Sub
      
      Private Sub ComputeButton_Click(sender As Object, e As EventArgs) Handles ComputeButton.Click
          For outer As Integer = 1 To input
              For inner As Integer = 1 To outer
                  ListBox.Items.Add(&quot;#&quot;)
              Next
              ListBox.Items.Add(&quot;&quot;)
          Next
      End Sub
      
      Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox.SelectedIndexChanged
      End Sub
  End Class
  </code></pre>
  <p><a href="https://i.stack.imgur.com/memfV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/memfV.png" alt="enter image description here" /></a></p>
  <p>I get this error when trying to treat it like dart</p>
  <blockquote>
  <p>System.InvalidCastException: 'Conversion from string &quot;#&quot; to type 'Double' is not valid.'</p>
  </blockquote>
  <p>I need help.</p>