If they're a 2D array, you can implement rotation by copying with different array access orders.
i.e., for a clockwise rotation, try:
int [,] newArray = new int[4,4];
for (int i=3;i>=0;--i)
{
for (int j=0;j<4;++j)
{
newArray[j,3-i] = array[i,j];
}
}
Counter-clockwise is similar.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…