Re: problem with string.Contains()

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



opps, my typo when creating this post.
I mean:
if (line.Contains( "</table>" ))
{
boolean = false;
}



"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
news:MPG.223f5cbed04bc7a6aab@xxxxxxxxxxxxxxxxxxxxxxx
<"Jeff" <no_email_address>> wrote:
I'm trying to search a string to determine if the string contains
</table>,
but string.Contains don't find it. I've used WebRequest/WebReponse to
retrieve the html from a webpage and now I'm searching through this
html...
this webpage contains 4 html tables. so there are 4 </table>, but my code
don't find any...

Here is part of my code, this if-statment don't get true...
string line;
if (line.Contains(" </table>" ))
{
boolean = false;
}

any suggestions?

Did you mean to look for " </table>" including a leading space?

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk


.



Relevant Pages