Don Kapevic

Don Kapevic

  • NA
  • 20
  • 973

Array Conversion

Apr 4 2015 12:34 PM
How do I convert a 2d string array to 2d decimal array in c# ?
I have tried using 'Array.ConvertAll' but this is throwing an error..

decimal[,]myReadData=new decimal[6,5];
string[,]myData=new string[6,5];

myReadData = Array.ConvertAll<string, decimal>(myData, Convert.ToDecimal);

Does 'Array.ConvertAll' only work with 1d arrays ?


Thanks in advance


Answers (3)