I have a two dimensional array and I need to convert it to a List (same object). I don’t want to do it with for or foreach loop that will take each element and add it to the List. Is there some other way to do it?
I have a two dimensional array and I need to convert it to a
Share
To convert
double[,]toList<double>, if you are looking for a one-liner, here goesBut, if you are looking for something efficient, I’d rather say you don’t use this code.
Please follow either of the two answers mentioned below. Both are implementing much much better techniques.