code_junkie

Generics vs. Array Lists

Nov 11th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Public Sub Run(ByVal strToProcess As String) Implements IPerfStub.Run
  2. Dim genList As New ArrayList
  3.  
  4. For Each ch As Char In strToProcess.ToCharArray
  5. genList.Add(ch)
  6. Next
  7.  
  8. Dim dummy As New System.Text.StringBuilder()
  9. For i As Integer = 0 To genList.Count - 1
  10. dummy.Append(genList(i))
  11. Next
  12.  
  13. End Sub
  14.  
  15. Public Sub Run(ByVal strToProcess As String) Implements IPerfStub.Run
  16. Dim genList As New List(Of Char)
  17.  
  18. For Each ch As Char In strToProcess.ToCharArray
  19. genList.Add(ch)
  20. Next
  21.  
  22. Dim dummy As New System.Text.StringBuilder()
  23. For i As Integer = 0 To genList.Count - 1
  24. dummy.Append(genList(i))
  25. Next
  26. End Sub
Add Comment
Please, Sign In to add comment