(2000 각 이상)이 개 거대한 목록이 내가 & 그들을 비교 분석하고자합니다.
목록처럼 보이는 무엇 : 같은
zone "exampledomain.com" {
zone "exampledomain2.com" {
zone "exampledomain3.com" {
zone "exampledomain4.com" {
zone "exampledomain5.com" {
zone "exampledomain6.com" {
zone "exampledomain7.com" {
가 다른 목록이 보이는 무엇 : 두리스트는 { "____"존이 같은 형식이
zone "exampledomain.com" {
zone "exampledomain3.com" {
zone "exampledomain5.com" {
zone "exampledomain7.com" {
나는 그래서 구문 분석 할 도메인을 비교 한 다음 도메인의 차이점을 얻을 수 있으므로 다른 하나가 누락되었음을 알고 있으므로 둘 다 동일한 결과를 가져야합니다.
static void Main(string[] args)
{
string s1 = "i have a car a car";
string s2 = "i have a new car bmw";
List<string> diff;
IEnumerable<string> set1 = s1.Split(' ').Distinct();
IEnumerable<string> set2 = s2.Split(' ').Distinct();
if (set2.Count() > set1.Count())
{
diff = set2.Except(set1).ToList();
}
else
{
diff = set1.Except(set2).ToList();
}
}
하지만 내가 각 목록 2000 이상의 라인을 가지고 생각을 할 수있는 가장 좋은 방법 일 것입니다 무슨 궁금 :
는이 코드를 가로 질러왔다.