任何人都可以帮助我理解这个功能吗?

时间:2021-04-22 20:46:31

标签: c# logic operators

int[] nums = new int[] { 4, 1, 2, 1, 2 };
foreach (var num in nums)
{
   singleNumber ^= num; // want to know , what operation will perform by this line
   Console.WriteLine(singleNumber + " for number - "+num);
}

我想知道是否有人可以帮助我理解以下行将执行什么操作: singleNumber ^= num;

0 个答案:

没有答案