[csharp] refactor cell and tag position handling