c# 中&&和 ||同时出现,优先计算&&
测试代码如下
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
bool bo; ;
bo = true || true && false;//从左往右false//如果先计算&& 得true;
Console.WriteLine(bo);
}
}
}