text: public static bool HasExactSharedBorder(CellRangeAddress crA, CellRangeAddress crB){int oFirstRow = crB.FirstRow;int oLastRow = crB.LastRow;int oFirstCol = crB.FirstColumn;int oLastCol = crB.LastColumn;if (crA.FirstRow > 0 && crA.FirstRow - 1 == oLastRow ||oFirstRow > 0 && oFirstRow - 1 == crA.LastRow){return crA.FirstColumn == oFirstCol && crA.LastColumn == oLastCol;}if (crA.FirstColumn > 0 && crA.FirstColumn - 1 == oLastCol ||oFirstCol > 0 && crA.LastColumn == oFirstCol - 1){return crA.FirstRow == oFirstRow && crA.LastRow == oLastRow;}return false;}