There's no direct "slice" operation, but you can define an extension method like this:
public static IEnumerable<T> SliceRow<T>(this T[,] array, int row)
{
for (var i = 0; i < array.GetLength(0); i++)
{
yield return array[i, row];
}
}
double[,] prices = ...;
double[] secondRow = prices.SliceRow(1).ToArray();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…