摘要: 一、Union 返回并集,并集是指位于两个集合中任一集合的唯一的元素(自动去重复了)。 Union会去除重复项,相当于SQL的Union 1.查询语句写法 var q = (from c in db.Customers select c.Country ).Union(from e in db.Em 阅读全文
posted @ 2020-12-30 15:25 清和时光 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 一、常用的三元表达式(三元运算符 ?) int a = 2; int b = 5; string result = a > b ? "大于" : "小于"; Console.WriteLine(result); //输出:小于 解读:string result=a>b?"大于" : "小于"; a大 阅读全文
posted @ 2020-12-30 14:00 清和时光 阅读(1589) 评论(0) 推荐(0) 编辑