I have a forloop that loops through an array and converts the array into a list of float.
private List<Single> xfloats;
for (int i = 0; i < DataServerManager.instance.x.Count; i++)
{
xfloats = DataServerManager.instance.x.Select(str => (ok: Single.TryParse(str, out Single f), f)).Where(t => t.ok).Select(t => t.f).ToList();
}
I have another list of floats called 'tempList' and I want to add the results from 'xfloats' into the tempList. But I am getting the error: error CS1503: Argument 1: cannot convert from 'System.Collections.Generic.List' to 'float'
List<float> tempList = new List<float>();
tempList.Add(xfloats);
How do I add a list of floats into a list of floats?