How to remove characters from a string to get the desired format?

Posted by Samiul on Stack Overflow See other posts from Stack Overflow or by Samiul
Published on 2010-05-27T22:03:18Z Indexed on 2010/05/27 22:11 UTC
Read the original article Hit count: 124

Filed under:

Hi all,

I have a string representation exactly like 'ComputerName -- IPAddress'; i.e:

'samarena -- 192.168.1.97'

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

Please help me out.

Thanks.

© Stack Overflow or respective owner

Related posts about c#