input: 
  def convert_python_to_csharp(code: str) -> str:
      """ Given a Python function as a string, convert it to a C# function.
      >>> convert_python_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 = code.split('\n')
      csharp_code = []
      function_name = ''
      parameters = ''
      return_type = 'int'  # Default return type
  
      for line in lines:
          if line.startswith('def '):
              function_name = line[4:line.index('(')]
              parameters = line[line.index('(') + 1:line.index(')')]
              if '->' in line:
                  return_type = line[line.index('->') + 3:].strip()
              csharp_code.append(f'public {return_type} {function_name.capitalize()}({parameters})')
              csharp_code.append('{')
          elif line.strip().startswith('if '):
              csharp_code.append(f'    if ({line[3:].strip()})')
              csharp_code.append('    {')
          elif line.strip().startswith('else:'):
              csharp_code.append('    }')
              csharp_code.append('    else')
              csharp_code.append('    {')
          elif line.strip().startswith('return '):
              csharp_code.append(f'        return {line[7:].strip()};')
          elif line.strip() == '':
              continue
          else:
              csharp_code.append(f'        {line.strip()};')
  
      csharp_code.append('    }')
      csharp_code.append('}')
  
      return '\n'.join(csharp_code)