I am working with C# and I have a following
List<List<UserObj>> obj;
How do I get the inner list (List<UserObj>
) of obj?
Thanks.
There isn't an inner list - there are many of them.
You can get a specific one, for example: obj[0]
.
Alternatively you can concatenate the contents of all the lists into one long list:
var result = obj.SelectMany(x => x).ToList();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With