using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LINQ_join
{
public class Student
{
public int Id;
public int Age;
public string Name;
//显示的提供一个构造函数以便于初始化
public Student(int id, int age, string name)
{
this.Id = id;
this.Age = age;
this.Name = name;
}
}
public class Course
{
public int Id;
public string CourseName;
public Course(int id, string courseName)
{
this.Id = id;
this.CourseName = courseName;
}
class Program
{
static void Main(string[] args)
{
//使用强类型来初始化对象
List<Student> stu = new List<Student>();
stu.Add(new Student(1, 21, "小雨"));
stu.Add(new Stude
C# LINQ(三)连接
最新推荐文章于 2024-05-08 15:04:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)