Initializing Property in Constructor

suggest change
class Example
{
    public string Foobar { get; set; }
    public List<string> Names { get; set; }
    public Example()
    {
        Foobar = "xyz";
        Names = new List<string>(){"carrot","fox","ball"};
    }
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents