C# Solution
Complexity

Time complexity:  O(n)


Space complexity: O(1)

Code
# Complexity
- Time complexity:  $$O(n)$$

- Space complexity: $$O(1)$$

# Code
```csharp []
public class Solution {
    public int AreaOfMaxDiagonal(int[][] arr) 
    {
        double d = 0;
        double maxD = 0;
        int maxArea = 0; // res
        int i = 0;
        for (i = 0; i < arr.Length; ++i)
        {
            d = Math.Sqrt(arr[i][0] * arr[i][0] + arr[i][1] * arr[i][1]);
            if (d > maxD)
            {
                maxD = d;
                maxArea = arr[i][0] * arr[i][1];
            }
            else if (d == maxD)
            {
                if (arr[i][0] * arr[i][1] > maxArea)
                {
                    maxArea = arr[i][0] * arr[i][1];
                }
            }
        }
        
        return maxArea;
    }
}
```
['C#']