input: 
  def convert_to_csharp(python_code: str) -> str:
      """
      Converts a given Python program to a C# program. The input should be a Python function definition.
      Example:
      for convert_to_csharp('def power(x, y):\n    if y == 0:\n        return 1\n    else:\n        return x * power(x, y - 1)') == 'public int Power(int x, int y)\n{\n    if (y == 0)\n    {\n        return 1;\n    }\n    else\n    {\n        return x * Power(x, y - 1);\n    }\n}'
      """
  
output:     lines = python_code.split('\n')
      csharp_code = []
      indent_level = 0
      for line in lines:
          if line.strip().startswith('def '):
              func_name = line.split('(')[0].split()[-1]
              args = line.split('(')[1].split(')')[0].split(', ')
              csharp_args = ', '.join([f'int {arg}' for arg in args])
              csharp_code.append(f'public int {func_name.capitalize()}({csharp_args})')
              csharp_code.append('{')
              indent_level += 1
          else:
              csharp_line = line.replace('if ', 'if (').replace(':', ')')
              csharp_line = csharp_line.replace('return ', 'return ') + ';'
              csharp_line = csharp_line.replace('else:', 'else')
              csharp_code.append('    ' * indent_level + csharp_line)
              if 'else' in line:
                  csharp_code.append('    ' * indent_level + '{')
                  indent_level += 1
              if line.strip().endswith(':'):
                  csharp_code.append('    ' * indent_level + '{')
                  indent_level += 1
              if line.strip().endswith('return 1') or line.strip().endswith('return x * power(x, y - 1)'):
                  indent_level -= 1
                  csharp_code.append('    ' * indent_level + '}')
      csharp_code.append('}')
      return '\n'.join(csharp_code)