input: Write a function to convert a given Python program to a C# program. The function should take the Python function as input and return the equivalent C# function. If the input Python function is empty, the function should return an empty string.
  assert 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}"
  assert convert_to_csharp("def add(a, b):\n    return a + b")==
      "public int Add(int a, int b)\n{\n    return a + b;\n}"
  assert convert_to_csharp("")==""
  assert convert_to_csharp("def greet():\n    print('Hello, World!')")==
      "public void Greet()\n{\n    Console.WriteLine(\"Hello, World!\");\n}"
output: def convert_to_csharp(python_code):
      if not python_code:
          return ""
      
      lines = python_code.strip().split('\n')
      function_name = lines[0].split('(')[0].split(' ')[1]
      parameters = lines[0].split('(')[1].split(')')[0].split(', ')
      param_types = ['int ' + p if p.isalpha() else p for p in parameters]
      param_string = ', '.join(param_types)
      
      csharp_lines = []
      csharp_lines.append(f"public int {function_name}({param_string})")
      csharp_lines.append("{")
      
      for line in lines[1:]:
          if line.strip().startswith("return"):
              csharp_lines.append(f"    return {line.strip()[6:]};")
          elif line.strip().startswith("print"):
              csharp_lines.append(f"    Console.WriteLine({line.strip()[5:].strip('()')});")
          elif line.strip().startswith("if"):
              csharp_lines.append(f"    if ({line.strip()[2:].strip(':')})")
              csharp_lines.append("    {")
          elif line.strip().startswith("else"):
              csharp_lines.append("    }")
              csharp_lines.append(f"    else")
              csharp_lines.append("    {")
          else:
              csharp_lines.append(f"    {line.strip()}")
      
      csharp_lines.append("}")
      
      return '\n'.join(csharp_lines)