Im trying to take the numbers from a file display them in a text box and then do calculations with each one which are finding the biggest number out of them, the smallest number and the average. right now i havecreated the form and added the open file to the menu strip and have gotten to load the numbers from the text file into my list box but i cant figure out how to seperate each number individually on their own line in the list box.. here's the code if in anyone is interested in helping. Thanks!
public partial class Form1 : Form
numbers = new List<double>();
To do the math calculations you want though, you'll probably want to parse them from strings into doubles:
string numberStrings = filenumbers.Split(' ');
double numbers = new double[numberStrings.Length];
for(int i = 0; i < numberStrings.Length; i++)
numbers[i] = Double.Parse(numberStrings[i]); //Convert the string to a double
That parse method also works with other types (e.g. integers, using Int32.Parse(...)). An error checking version is Double.TryParse(string, out double), but to use it you'll need to read about out parameters if you want to use it http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx
Also, please surround code snippets with [code] and [/code] tags, to preseve formatting and increase the probability of a reply.