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

Hybrid View

  1. #1
    Join Date
    Apr 2005
    Posts
    151

    [SOLVED] string.contains problems

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

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

    If I try this :

    Code:
    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
  •  





Click Here to Expand Forum to Full Width

Featured