title: Remove Characters after occurrence of "."
body: <p>If the string is "abcd.vv" the code has to remove the ".vv" and return only "abcd". I am using the bellow code but it gives me error like </p>
  
  <p><strong>"Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement"</strong></p>
  
  <pre><code>public string remChar(string LicID)
  {
      if (LicID.Contains("."))
        {
          int index = LicID.IndexOf(".");
          return LicID.Substring(0, index);
        }
      else LicID;
  }
  </code></pre>