title: C# String.Contains() malfunction?
body: <p>I am trying to check whether a string contains a specific string or not.</p>
  
  <p>Briefly, here is my code (which is a small part of the program where I omitted irrelevant codes) : </p>
  
  <pre><code>string y = someValue;
  for(string x in someCollection)
              {
                  if (x.Contains(y))
                  {
                      Debug.WriteLine(x + " Contains " + y);
                  }
                  else
                  {
                      Debug.WriteLine(x + " Does Not Contain " + y);
                  }
              }
  </code></pre>
  
  <p>However, this is what I get as the result:</p>
  
  <pre><code>"Alligator" Contains "Alligator"
  "Loves" Does Not Contain "Love"
  "To Eat You" Does Not Contain "You"
  </code></pre>
  
  <p>So, how come!?! Contains() returns true only when both strings are the exact matches?? Something is not right here...</p>
  
  <p>ps. the string x and y were read from a text file and have been through some text cutting process, if that would help...</p>