Easy C# Solution
\npublic class Solution\n{\n    public string ConvertToBase7(int num)\n    {\n        if (num == 0)\n        {\n            return "0";\n        }\n\n        in
```\npublic class Solution\n{\n    public string ConvertToBase7(int num)\n    {\n        if (num == 0)\n        {\n            return "0";\n        }\n\n        int sign = Math.Sign(num);\n        Stack<int> mods = new Stack<int>();\n\n        num = Math.Abs(num);\n\n        while (num != 0)\n        {\n            mods.Push(num % 7);\n            num /= 7;\n        }\n\n        StringBuilder sb = new StringBuilder(mods.Count + 1);\n        if (sign < 0)\n        {\n            sb.Append(\'-\');\n        }\n        while (mods.Count != 0)\n        {\n            sb.Append(mods.Pop());\n        }\n\n        return sb.ToString();\n    }\n}\n```
[]