converting array of array into list of list or vice verse in c#

Today I will show you that how can you convert Array of Array to List of List or List of List to Array of Array in c# using only single statement.

First we will convert Array of Array in to List of List.

int[][] myArray =               // some data 

List<List<int>> myList = myArray.Select(x => x.ToList()).ToList();

Now similarly we will convert List of List to Array of Array.

List<List<int>> myList =              //some data 

int[][] myArray = myList .Select(x => x.ToArray()).ToArray();

admin