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 Student(2, 24, "小魏"));