using System.Collections.Generic;
public static void Main()
void ModList(List<int> listToMod) {
void ModListByRef(ref List<int> listToMod) {
x.MyList = new List<int>();
Console.WriteLine(string.Join(';', x.MyList.Select(y => y.ToString())));
y.MyList = new List<int>();
var listAsVar = y.MyList;
ModListByRef(ref listAsVar);
Console.WriteLine(string.Join(';', x.MyList.Select(y => y.ToString())));
public List<int> MyList {get; set;}