$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #613

Which programming language is this?

public class Settings
{
    public string Theme { get; init; } = "light";
    public List<string>? Plugins { get; set; }
}

var s = new Settings { Theme = "dark" };
s.Plugins ??= new List<string>();

Answer: C#

An { get; init; } init-only property, the nullable List<string>? and the ??= assignment are C#.
Play Programming Languages ▸