title: How do i remove all white spaces from a string?
body: <p>I have this code:</p>
  
  <pre><code>if (TextParsingConfiguration.join == true)
                  {
                      images = images.Trim(' ');
                  }
                  if (TextParsingConfiguration.removecommas == true)
                  {
                      images = ReplacingChars(images, new[] { ',', '"' }, " ");
                  }
  </code></pre>
  
  <p>join and removecommas are bool variables im using them also in form1 in checkBoxes.
  And the ReplacingChars method:</p>
  
  <pre><code>public static string ReplacingChars(string source, char[] toReplace, string withThis)
          {
              return string.Join(withThis, source.Split(toReplace, StringSplitOptions.None));
          }
  </code></pre>
  
  <p>Maybe im wrong here with the logic but i wanted to give the user two options.</p>
  
  <ol>
  <li>to remove all Remove commas and Quotation marks this the removecommas bool variable.</li>
  <li>to join meaning to remove all the whit spaces but not the commas and Quotation marks just remove/delete the white spaces so the whole text will be like a block of text.</li>
  </ol>
  
  <p>The question if number 2 is logic at all ? And if not what other options to remove(clean) i can make ?
  The removecommas is working. Its removing commas and Quotation marks and leave the spaces as it was.</p>