I have a string array, and I want to check if a string is a number, and then put it in an object array as an int.
(For those of you asking why an object array, because I want to check for characters and other things too)
I have this:
Console.WriteLine("Enter parameters for the function with a space in between each parameter: "); String stringParameters = Console.ReadLine();
String[] parametersStringArray = stringParameters.Split(' ');
Object[] parametersArray = new Object[parametersStringArray.Length];
for (int i = 0; i < parametersStringArray.Length; i++)
{
int.TryParse(parametersStringArray[i], out int.Parse(parametersArray[i]));
}
It doesn't compile and I am not familiar with the 'out' command, what's wrong and how do I fix it?
Thanks.