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

Thread: string.contains problems

  1. #1
    Join Date
    Apr 2005
    Posts
    150

    [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 02: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

This is a CodeGuru survey question.


Featured


HTML5 Development Center