input: def convert_python_to_csharp_power(python_code: str) -> str:
      """ Converts a given Python function that calculates the power of a number to a C# function.
      >>> convert_python_to_csharp_power('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 = []
      for line in lines:
          if line.strip().startswith('def'):
              csharp_code.append(f'public int {line.split("(")[0].split()[-1]}(int x, int y)')
          elif line.strip().startswith('if'):
              csharp_code.append(f'    if ({line.split("(")[1].split(")")[0]})')
          elif line.strip().startswith('return'):
              csharp_code.append(f'        return {line.split(" ")[1]};')
          elif line.strip().startswith('else'):
              csharp_code.append('    else')
          else:
              csharp_code.append(line)
      return '{\n' + '\n'.join(csharp_code[1:]) + '\n}'