Is there a method that compares the strings by content even if they are not in the same order? For example if I have this
String s1="3,4";
String s2="4,3";
When comparing both of true instead of false as it normally is
Is there a method that compares the strings by content even if they are not in the same order? For example if I have this
String s1="3,4";
String s2="4,3";
When comparing both of true instead of false as it normally is
Using
Linq
, the implementation of what you want is made very simple:The idea can be summarized in two steps:
False
.I leave you an example in .Net Fiddle where you can test it.