Very Simple C# Solution
csharp\n\npublic class Solution\n{       \n    class Point : IComparable<Point>\n    {\n        public readonly int x;\n        public readonly int y;\n        
``` csharp\n\npublic class Solution\n{       \n    class Point : IComparable<Point>\n    {\n        public readonly int x;\n        public readonly int y;\n        public static Point origin;\n        \n        public Point(int x, int y)\n        {\n            this.x = x;\n            this.y = y;            \n        }\n        \n        public int CompareTo(Point other)\n        {\n            return (Math.Abs(x - origin.x) + Math.Abs(y - origin.y)) \n                - (Math.Abs(other.x - origin.x) + Math.Abs(other.y - origin.y));\n        }\n    }\n    \n    public int[][] AllCellsDistOrder(int R, int C, int r0, int c0) {      \n         List<Point> points = new List<Point>();\n         Point.origin = new Point(r0, c0);\n\t\t \n         for(int r = 0; r < R; r++)\n         {\n             for(int c = 0; c < C; c++)\n             {\n                 points.Add(new Point(r, c));  \n             }             \n         }                \n           \n        return points.OrderBy(p => p).Select(p => new int[] { p.x, p.y}).ToArray();          \n    }\n}\n```
[]