CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2005

    [SOLVED] string.contains problems

    Why doesn't this if-statement return as true :

    if (txtWoord.Text.Contains(txtLaatsteLetterIngedrukt.Text) == true)
    If I debug, then txtWoord.Text = "word" and txtLaatsteLetterIngedrukt.Text = "w"

    If I try this :

    if (txtWoord.Text.Contains("w") == true)
    Then the if-statement returns a true, so the problem is the argument, but what do I overlook?

    edit : found the solution, argument of contains() is case-sensitive
    Last edited by da_cobra; October 29th, 2011 at 01:03 PM. Reason: found solution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.