I am initialising and array from items in a list as follows:
MyArray[] Arrayitems = SomeOtherList
.Select(x => new MyArray[]
{
ArrayPar1 = x.ListPar1,
}).ToArray()
I have a secondary List that i would like to add to the same array inline in the initialiser, something like this ():
MyArray[] Arrayitems = SomeOtherList
.Select(x => new MyArray[]
{
ArrayPar1 = x.ListPar1,
}).ToArray()
.Join(
MyArray[] Arrayitems = SomeOtherListNo2
.Select(x => new MyArray[]
{
ArrayPar1 = x.ListPar1,
}).ToArray()
);
Is this possible or will i have to combine everything before the initial select statement?
new MyArray()?new MyArray[]does not make sense with your given initializer and result type.