<p>Say I have a rectangular string array - not a jagged array</p>

<pre><code>string[,] strings = new string[8, 3];
</code></pre>

<p>What's the best way to extract a one-dimensional array from this (either a single row or a single column)?  I can do this with a for loop, of course, but I'm hoping .NET has a more elegant way built in.</p>

<p>Bonus points for converting the extracted string array to an object array.</p>

LINQ is the answer
```
```
static object[] GetColumn(string[][] source, int col) {
    return source.Iterate().Select(x => source[x.Index][col]).Cast<object>().ToArray();
}
static object[] GetRow(string[][] source, int row) {
    return source.Skip(row).First().Cast<object>().ToArray();
}
public class Pair<T> {
    public int Index;
    public T Value;
    public Pair(int i, T v) {
        Index = i;
        Value = v;
    }
}
static IEnumerable<Pair<T>> Iterate<T>(this IEnumerable<T> source) {
    int index = 0;
    foreach (var cur in source) {
        yield return new Pair<T>(index, cur);
        index++;
    }
}
```
```