title: Collect the digits numbers in the decimal number C#
body: <p>I want a method to remove the comma from the decimal number and then collect the digits. For example, if the user inputs <code>1,3</code> it will remove the comma and collect <code>1</code> and <code>3</code> together. I mean 1+3 =4. Can I use trim or replace?</p>
  <pre><code>public int AddSum(string x1)
  {
      string x = x1.Trim();
          
      int n = Convert.ToInt32(x);
      return n;
  }
  </code></pre>