Esempio, la stringa s3 conterrà tutte le lettere che sono in comune.
codice:string s = "acdefgimnqrstvz"; string s2 = "aabbehlolrz"; string s3 = String.Empty; foreach (char c in s) { foreach (char c2 in s2) { if (c2 == c && !(s3.Contains(c2))) s3 += c2; } }