int[] a = new int[] { 1, 2, 4, 5 }; int[] b = new int[] { 1, 3, 4, 5 }; if (Enumerable.SequenceEqual(a,b)) { MessageBox.Show("一樣"); } Enumerable.SequenceEqual(strs1, strs2); //通過使用相同類型的默認相等比較器對序列元素進行比較,以確定兩個序列是否相等。
int[] a = new int[] { 1, 2, 4, 5 }; int[] b = new int[] { 1, 3, 4, 5 }; if (Enumerable.SequenceEqual(a,b)) { MessageBox.Show("一樣"); } Enumerable.SequenceEqual(strs1, strs2); //通過使用相同類型的默認相等比較器對序列元素進行比較,以確定兩個序列是否相等。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。