title: How do I work with labels in VB 2010?
body: <p>My name is Alex and I'm new to VB. I'm sorry but I am off topic. I just have one question : can anybody try to direct me to a link (or explain directly) in order to understand better how Visual Basic labels work? I need to understand what is the diference between a label and a variable and how we use labels. So far I have only used freebasic for some minor programming (build a small calculator etc.) and I would really apreciate your answer. Now I am using Visual Studio 2010 and I am following some tutorials that just give me the code without explaining how everything works. For example in building a calculator the tutorial used this code for the equal sign "=": </p>
  
  <pre><code>If Label2.Text &gt; "" And Label2.Text = "+" Then 
      Button1.Text = Val(Label1.Text) + Val(Button1.Text) 
      Label3.Text = Button1.Text 
  ElseIf Label2.Text &gt; "" And Label2.Text = "-" Then 
      Button1.Text = Val(Label1.Text) - Val(Button1.Text) 
      Label3.Text = Button1.Text 
  ElseIf Label2.Text &gt; "" And Label2.Text = "*" Then 
      Button1.Text = Val(Label1.Text) * Val(Button1.Text) 
      Label3.Text = Button1.Text 
  ElseIf Label2.Text &gt; "" And Label2.Text = "/" Then 
      Button1.Text = Val(Label1.Text) / Val(Button1.Text) 
      Label3.Text = Button1.Text 
  Else 
  End If
  </code></pre>