Quantcast
Viewing all articles
Browse latest Browse all 27212

VS 2010 Speeding Up My Code

Code:

  Dim str As String = "something bla bla "
If CheckBox3.Checked Then 
                          For Each itm As String In ListBox2.Items
                                If str.Contains(itm) Then
                                    Dim imp As String = "Something here"
                                    For Each pair In list
                                        If pair.Contains(imp) Then
                                            id = pair.Replace(imp, "")
                                        End If
                                                                            Next
                                    End If
                            Next
                        End If

Is there any shorter and faster way to do this ?
also im reading the strings into a list of strings which are in this format :
Quote:

Example 45432
Quote:

Example1 85859
Again, is there any alternative way to do this in a faster way i should be able remove the whole string in list if half of the string matches ?

Viewing all articles
Browse latest Browse all 27212


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>