Thanks you for reaching out!
I have a list of doubles:
List<double> list = new List<double>()
{
2.7, -3.5, 0.6, 34.83, 7.458, 0, 9.20, -20.40, 12.2
};
How can I retrieve the number that contains the most digits after the comma? (in this case 7.458
)
What I tried so far was to declare a DecimalSeparator
NumberFormatInfo nfi = new NumberFormatInfo();
nfi.NumberDecimalSeparator = ".";
and to try and Split (using LINQ) every number from the list
list.Split(nfi);
but I can't do that because it's a list of doubles, should I convert the list to a list of strings and then go from there? Or is it another method that I don't know about...
Thanks in advance for the response! Have a great day! :D
(Sorry if the question is too basic... I'm new to C# :c )