I wanted to have an extension method to Combobox control which suggest the combobox list items by any part of the string. rather than the first part of the list items. i have done some coding but which is failing
(1) Auto suggest not appearing
(2) Combo box texts are over writing, i mean only one character remaining in the text field.
(3) Some times, the Horrible Happens
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'


C# Code:
  1.  
C# Code:
  1. public static void AutoCompleteByAnyString(this ToolStripComboBox CboBx,
  2.                                                     DataTable SourceTable,
  3.                                                     string Q )
  4.         {            
  5.  
  6.  
  7.             if (Q.Length > 0 && SourceTable != null)
  8.             {                
  9.  
  10.  
  11.                 var Fs = (from Dr in SourceTable.AsEnumerable()
  12.                                where Dr.Field<String>("Fs").Contains(Q.ToUpper())
  13.                                select Dr [CboBx.ComboBox.DisplayMember]).ToArray();
  14.  
  15.  
  16.                
  17.  
  18.  
  19.                 AutoCompleteStringCollection A = new AutoCompleteStringCollection();
  20.                 foreach (var item in Fs)
  21.                 {
  22.                     A.Add(item.ToString());
  23.                 }
  24.  
  25.  
  26.                 CboBx.AutoCompleteSource = AutoCompleteSource.CustomSource;
  27.                 CboBx.AutoCompleteCustomSource = A;              
  28.                CboBx.AutoCompleteMode = AutoCompleteMode.Suggest;
  29.                
  30.             } else
  31.             {
  32.                 CboBx.AutoCompleteSource = AutoCompleteSource.ListItems;
  33.                 CboBx.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
  34.             }
  35.            
  36.         }
  37. [COLOR=#242729][FONT=Arial][/FONT][/COLOR]

The above code should have displayed the suggested list items in the combobox.
Note: i am using VS2019