input: Write a function to convert a given Python program to a C# program. The function should take the Python code as a string and return the equivalent C# code as a string.
  
  def python_to_csharp(python_code: str) -> str:
      # Conversion logic here
      pass
  
  assert 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}"
  assert python_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 python_to_csharp("") == ""
  assert python_to_csharp("def add(a, b):\n    return a + b") == "public int Add(int a, int b)\n{\n    return a + b;\n}"
  assert python_to_csharp("def is_even(n):\n    return n % 2 == 0") == "public bool IsEven(int n)\n{\n    return n % 2 == 0;\n}"
output: def python_to_csharp(python_code: str) -> str:
      if not python_code:
          return ""
      
      lines = python_code.split("\n")
      function_name = lines[0].split("def ")[1].split("(")[0]
      parameters = lines[0].split("(")[1].split(")")[0].split(", ")
      return_type = "int" if "return" in python_code and "*" in python_code else "bool"
      
      csharp_code = f"public {return_type} {function_name.capitalize()}({', '.join([f'int {p}' for p in parameters])})\n{{\n"
      
      for line in lines[1:]:
          if line.strip().startswith("return"):
              csharp_code += f"    return {line.strip()[6:]};\n"
          elif line.strip().startswith("if"):
              csharp_code += f"    if ({line.strip()[2:].strip()})\n    {{\n"
          elif line.strip().startswith("else"):
              csharp_code += "    }\n    else\n    {\n"
          elif line.strip() == "":
              csharp_code += "    }\n"
      
      csharp_code += "}"
      return csharp_code