Received Webresponse String Editing

Asked

Viewed 50 times

-1

I receive information through responseStreamReader.ReadToEnd().ToString();.

But before displaying it on the User screen I want to edit it. How to proceed?

  • Your doubt is just like editing a String ?

  • Yes, I get a series of data in that string and id, request time, send time, status and before displaying accurate separates and edit that data

  • Provide more details. Are you making a Web Request to where? What is returned? What do you want to edit? You can edit your question and add to it?

  • The Method is communicating with a URL and receives as response the balance of messages "OK 697" I want to display only "697"

  • You can replace responseStreamReader.ReadToEnd().ToString().Replace("OK ","");

  • Thanks David worked out!!

Show 1 more comment

1 answer

0

According to the comments of the question, I think you wanted to know how to change the contents of a string. In that case, what @David said is a possibility:

reponseStreamReader.ReadToEnd().ToString().Replace("OK ", "");

But there are many functions that modify a string, which are documented at this MSDN link.

  • Thanks man!!! This link helped a lot!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.