title: length cant be less than zero parameter name length error in vb.net
body: <p>Am getting data from database and store in dataset.dataset contains list of phone numbers.
  i want to find out the length of each and every phone numbers. if it is length ten means add it in one datatable. Or length greater than 10 means get the 10 char from the right side of the phone number and stored it on the same datatable.Here is my code.when i debug the code i get only 8000 some thing rows.but originally the dataset contains 40,700 row values. after the<br>
  datatable reaches 8000 rows am getting error</p>
  
  <pre><code>my code
  -------
    ada.Fill(ds, "reports.renewal_contact_t ")
  
                  ds.Tables(0).DefaultView.RowFilter = " PHONE NOT like'0'"
                  dt = ds.Tables(0)
                  For Each q In dt.Rows
                      chkphone = q("PHONE").ToString
                      chkdphone = Regex.Replace(chkphone, "[^\d]", "")
  
                      'MessageBox.Show(chkdphone)
  
  
                      If (chkdphone.Length = 10) Then
                          Dim anyRow As DataRow = dt2.NewRow
                          anyRow(0) = chkphone.ToString
                          dt2.Rows.Add(anyRow)
  
                      ElseIf (chkdphone.Length &gt;= 10) Then
                          rsltstring = chkdphone.Substring(chkdphone.Length, -10)
  
                          Dim anyrow1 As DataRow = dt2.NewRow
                          anyrow1(0) = rsltstring.ToString
                          dt2.Rows.Add(anyrow1)
                      Else
  
  
                      End If
                  Next
  
                  new_ds.Tables.Add(dt2)
                  ComboBox1.DataSource = new_ds.Tables(0)
                  ComboBox1.DisplayMember = "PHONE" 
  
  
  
   Error
   -----
   length cant be less than zero parameter name length
  </code></pre>