input: Write a function to convert a given Python program to a C# program. The function should take a string representing the Python program and return a string representing the equivalent C# program. 
  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("") == ""
output: def convert_to_csharp(python_code):
      if python_code == "":
          return ""
      lines = python_code.split("\n")
      csharp_code = []
      for line in lines:
          if line.startswith("def "):
              func_name = line[4:line.index("(")]
              params = line[line.index("(")+1:line.index(")")]
              param_list = [p.split(":")[0] for p in params.split(", ")]
              csharp_code.append(f"public int {func_name.capitalize()}({', '.join(param_list)})")
              csharp_code.append("{")
          elif line.startswith("    return "):
              csharp_code.append(f"    return {line[11:]};")
          elif line.startswith("    if "):
              csharp_code.append(f"    if ({line[7:line.index(':')]})")
              csharp_code.append("    {")
          elif line.startswith("    else:"):
              csharp_code.append("    }")
              csharp_code.append("    else")
              csharp_code.append("    {")
          elif line.strip() == "":
              continue
      csharp_code.append("}")
      return "\n".join(csharp_code)