I have the following class

```
public class ListCode : List<int>
{
    public string Code { get; set; }
}

```

which can be initialized this way:

```
ListCode myList = new ListCode() { 1, 2, 3};
myList.Code = "bar";

```

But it can also be initialized that way:

```
ListCode myList = new ListCode() { Code = "bar"};
myList.AddRange(new[] { 1, 2, 3 });

```

Is there also a way to do this in one line? Like

```
ListCode myList = new ListCode() { 1, 2, 3, Code = "bar" }; //invalid syntax

```