Initializing Property in Constructor
suggest changeclass Example
{
public string Foobar { get; set; }
public List<string> Names { get; set; }
public Example()
{
Foobar = "xyz";
Names = new List<string>(){"carrot","fox","ball"};
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents