document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \'\'\' Prime Sieve \'\'\'
  2.     Private Function Sieve(ByVal limit As Integer) As List(Of Integer)
  3.         Dim sqrt As Integer, CrntNbr = 11
  4.         Sieve = {2, 3, 5, 7}.ToList
  5.         While CrntNbr < limit
  6.             sqrt = Math.Sqrt(CrntNbr)
  7.             For Each prime In Sieve
  8.                 If prime <= sqrt Then
  9.                     If CrntNbr Mod prime = 0 Then Exit For
  10.                 Else
  11.                     Sieve.Add(CrntNbr) : Exit For
  12.                 End If
  13.             Next
  14.             CrntNbr += 2
  15.         End While
  16.     End Function
');