title: VB.NET How give best performance "Select case" or IF... ELSEIF ... ELSE... END IF
body: <p>I have a huge DataTable, and I need go by each row and validate an specific value.</p>
  
  <p>Which method give me more performance, an structure of IF ELSE or SELECT CASE?
  (I'm focused in the method that offer me the best performance)</p>
  
  <p>IF ELSE (METHOD #1)</p>
  
  <pre><code>For Each vRow In vDTtemp.Rows
      If vRow("Item") = "Time" Then
          vRow("Result") = "000"
      ElseIf vRow("Item") = "DateTime" Then
          vRow("Result") = "001"
      ElseIf vRow("Item") = "String" Then
          vRow("Result") = "002"
      Else
          vRow("Result") = "N/A"
      End If
  Next
  </code></pre>
  
  <p>SELECT CASE (METHOD #2)</p>
  
  <pre><code>For Each vRow In vDTtemp.Rows
      Select Case vRow("Item")
          Case "Time"
              vRow("Result") = "000"
          Case "DateTime"
              vRow("Result") = "001"
          Case "String"
              vRow("Result") = "002"
          Case Else
              vRow("Result") = "N/A"
      End Select
  Next
  </code></pre>