c# - Convert array of string to array of double -
i have text file (.txt) decimal number :
0.3125 0.3 0.181818181818182 0.333333333333333 0.210526315789474 0.181818181818182
and want take these number array of double. here's code :
double[] f1 = convert.todouble(file.readlines("decimal list.txt").toarray());
but , error of
cannot implicity convert type 'double' 'double[]'
file.readlines("decimal list.txt") .select(l => convert.todouble(l)) .toarray();
Comments
Post a Comment