Question: I need to model a database with these conditions:

* One table for `Projects`
* Another table for `Programmers`
* A Programmer can be `Senior` or `Junior`
* Each project may have several Programmers but **at least** one Senior must exist.

I would like to define some kind of conditional foreign key to assure that of all programmers included into a project at least one of them is senior. Also no senior programmer could be downgraded to junior although the opposite can occur.

I don't know how to create this kind of constraints without resorting to some business logic.

Answer: 
```
int[][] finalDists = dists.Where((arr, i)=>i!=2) //skip row#3
                          .Select(arr=>arr.Where((item,i)=>i!=2) //skip col#3
                                          .ToArray())
                          .ToArray();

```
Not very optimized but:

```
public static T[] RemoveRow<T>(T[] array, int row)
{
    T[] array2 = new T[array.Length - 1];

    Array.Copy(array, 0, array2, 0, row);
    Array.Copy(array, row + 1, array2, row, array2.Length - row);

    return array2;
}

public static T[][] RemoveColumn<T>(T[][] array, int column)
{
    T[][] array2 = new T[array.Length][];

    for (int i = 0; i < array.Length; i++)
    {
        array2[i] = RemoveRow(array[i], column);
    }

    return array2;
}

```

and

```
int[][] dists = new int[][]
{
    new int[]{0,2,3,5,2},
    new int[]{2,0,1,3,5},
    new int[]{3,1,0,4,4},
    new int[]{5,3,4,0,2},
    new int[]{2,5,4,2,0}
};

int[][] dists2 = RemoveColumn(RemoveRow(dists, 2), 2);

```

Note that you want to remove the **third** row and the **third** column, but their index is **2**, because .NET arrays are 0-based indexed!