input: 
  def convert_to_csharp(python_code: str) -> str:
      """ Converts a given Python function to a C# function.
      >>> 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]
              params = line.split('(')[1].split(')')[0].split(',')
              param_types = ['int ' + p.strip() for p in params]
              csharp_code.append(f'public int {func_name}({", ".join(param_types)})')
              csharp_code.append('{')
              indent_level += 1
          elif line.strip().startswith('if '):
              csharp_code.append(' ' * indent_level * 4 + 'if (' + line.strip()[3:] + ')')
              csharp_code.append(' ' * indent_level * 4 + '{')
              indent_level += 1
          elif line.strip().startswith('else:'):
              indent_level -= 1
              csharp_code.append(' ' * indent_level * 4 + '}')
              csharp_code.append(' ' * indent_level * 4 + 'else')
              csharp_code.append(' ' * indent_level * 4 + '{')
              indent_level += 1
          elif line.strip().startswith('return '):
              csharp_code.append(' ' * indent_level * 4 + 'return ' + line.strip()[7:] + ';')
          elif line.strip() == '':
              continue
          else:
              csharp_code.append(' ' * indent_level * 4 + line.strip())
      if indent_level > 0:
          csharp_code.append(' ' * (indent_level - 1) * 4 + '}')
      return '\n'.join(csharp_code)