input: Write a function to convert a given Python function to a C# function. The function should accept two integer parameters and return an integer. The function in Python calculates the power of a number using recursion. If the given Python function is empty then 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("")==""
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]
      csharp_code = f"public int {function_name.capitalize()}(int x, int y)\n{{\n"
      for line in lines[1:]:
          line = line.strip()
          if line.startswith("if"):
              line = line.replace(":", "")
              csharp_code += f"    {line}\n    {{\n"
          elif line.startswith("return"):
              line = line.replace("power", function_name.capitalize())
              csharp_code += f"        {line};\n"
          elif line.startswith("else"):
              line = line.replace(":", "")
              csharp_code += f"    }}\n    {line}\n    {{\n"
      csharp_code += "    }\n}"
      return csharp_code