input: Write a function to convert a given Python program to a C# program. The function should take as input a Python function definition and return the equivalent C# function definition.
  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 greet(name):\n    return f'Hello, {name}!'") == "public string Greet(string name)\n{\n    return $\"Hello, {name}!\";\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("def factorial(n):\n    if n == 0:\n        return 1\n    else:\n        return n * factorial(n - 1)") == "public int Factorial(int n)\n{\n    if (n == 0)\n    {\n        return 1;\n    }\n    else\n    {\n        return n * Factorial(n - 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")
      func_def = lines[0]
      func_name = func_def.split("(")[0].split(" ")[1]
      params = func_def.split("(")[1].split(")")[0].split(", ")
      param_types = ["int" if p.isdigit() else "string" for p in params]
      param_list = ", ".join([f"{t} {p}" for t, p in zip(param_types, params)])
      return_type = "int" if "return" in python_code and python_code.split("return")[1].strip().isdigit() else "string"
      csharp_code = f"public {return_type} {func_name.capitalize()}({param_list})\n{{\n"
      for line in lines[1:]:
          if line.strip().startswith("return"):
              return_value = line.strip().split("return")[1].strip()
              if return_type == "string":
                  return_value = f"$\"{return_value}\""
              csharp_code += f"    return {return_value};\n"
          else:
              csharp_code += "    " + line.replace(":", "").replace("elif", "else if") + ";\n"
      csharp_code += "}"
      return csharp_code