Henry Vuong

Henry Vuong

  • NA
  • 27
  • 0

How do I compare strings to see if they are composed of the same words?

Oct 4 2012 3:15 PM
I need a method in C# that can compare two strings and tells me if they are composed of the same words, regardless of the word order. For example, the method should return "true" (i.e. the strings are the same) when comparing these two strings:

Mary has a little lamp
Little lamp has a Mary

and return "false" (i.e. the strings are different) when comparing these two strings:

Mary has a little lamp
Mary has a big lamp



Answers (1)