input: from typing import List
  
  def convert_to_csharp(python_code: str) -> str:
      """ Converts a given Python function to an equivalent C# function.
      >>> convert_to_csharp("def power(x, y):\\n    if y == 0:\\n        return 1\\n    else:\\n        return x * power(x, y - 1)\\n")
      "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}"
      """
output:     lines = python_code.split("\n")
      csharp_code = []
      function_name = ""
      parameters = []
      return_type = "void"
  
      for line in lines:
          if line.startswith("def "):
              function_name = line[4:line.index("(")]
              params = line[line.index("(")+1:line.index(")")]
              parameters = [param.split(":")[0] for param in params.split(", ") if ":" in param]
              return_type = "int" if "return" in python_code else "void"
              csharp_code.append(f"public {return_type} {function_name.capitalize()}({', '.join(parameters)})")
              csharp_code.append("{")
          elif line.startswith("    "):
              if "return" in line:
                  line = line.replace("return", "return ")
              line = line.replace(":", "")
              line = line.replace("elif", "else if")
              line = line.replace("else:", "else")
              line = line.replace("True", "true")
              line = line.replace("False", "false")
              line = line.replace("None", "null")
              csharp_code.append("    " + line + ";")
          elif line == "":
              csharp_code.append("}")
  
      return "\n".join(csharp_code)