How to remove characters from a string to get the desired format?
<p>I have a string representation exactly like 'ComputerName -- IPAddress'; i.e: </p>

<blockquote>
  <p>'samarena -- 192.168.1.97'</p>
</blockquote>

<p>. I want to get only the 'ComputerName' part from the actual representation by removing other characters. I'm actually quite beginner in using <code>string.FormatMethods()</code> .</p>

<p>Please help me out.</p>

<p>Thanks.</p>
