for (int col = Math.Max(0, targetCol - radius); col <= Math.Min(targetCol + radius, target[targetRow].Count - 1); col++)
{
// do smth
}