Mohamed Moumni

Mohamed Moumni

  • NA
  • 48
  • 7.8k

ignore space and order on searsh c# in textbox

Jun 23 2017 11:17 AM
i use this code to searsh a derictory name 
 
 
  1. foreach (object str in Dossiers.ls_dossier_devis)  
  2.                {  
  3.                    if (str.ToString().ToLower().Contains(textBox1.Text.ToLower()))  
  4.                    
  5.                    {  
  6.   
  7.                        listBox1.Items.Add(str);  
  8.                    }  
  9.                }  
 but i want the code ignore space and order of word 
 
     
can someone help pls ? 

Answers (2)