Do you have Stopping Point Syndrome? I didn’t know that I had it until I read a recent post on Programmers.SE about how someone just couldn’t find a stopping point and would work into the night or until he passed out. In essence, it’s when you want to wait until you get to a good stopping point, but you just can’t seem to get there. It’s a real problem, and one that many of us have faced before. Here’s how I’ve helped curb this problem in my own development life and used this need of a stopping point to my advantage.
Tag: How-To
using System.Text;
using System.Net;using System.IO;
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(URL);myRequest.Method = "GET";WebResponse myResponse = myRequest.GetResponse();StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8);string result = sr.ReadToEnd();sr.Close();myResponse.Close();
//Now, once you have this, perform the search on result string
int stringFound = result.IndexOf("My search string");