using System;
public class Program
{
static int pop;
static string[] log = new string[10];
public static void Main()
string abc = "5 6 10 345 23 45";
log = abc.Split(' ');
Conv(3,ref pop);
Console.WriteLine(pop); // expected result: pop == 345
}
static void Conv(int i, ref int load)
if (log[i] != null){ load = int.Parse(log[i]);}