/.net6_vs_.net8

List of differences between .NET6 & .NET8

.net6 vs .net8

List of differences between .NET6 & .NET8

Concept .NET6 (C#10) .NET8 (C#12)
List Creation List<Students> Students = new();
List<Students> Students = new(){ Name ="Nani" };
New & Simplified Way :
List<Student> Students = [];
Backward Compatibility:
List<string> errors = new List<string>();
List<string> studentNames = new();
Object Initialization:
List<Employee> employees = [new Employee { Id = 1, Name="nani" }];