c# how to convert an array into a list code example Example: c sharp array to list var list = new List<int>(array);