We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class Program { static void Main() { // 示例数组 string[] array1 = { "file1.pdf", "file2.pdf", "file3.pdf" }; string[] array2 = { "file2.pdf", "file3.pdf", "file4.pdf" }; // 找出在 array1 中但不在 array2 中的元素 var onlyInArray1 = array1.Except(array2); // 找出在 array2 中但不在 array1 中的元素 var onlyInArray2 = array2.Except(array1); Console.WriteLine("Only in array1:"); foreach (var item in onlyInArray1) { Console.WriteLine(item); } Console.WriteLine("\nOnly in array2:"); foreach (var item in onlyInArray2) { Console.WriteLine(item); } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: