input: from typing import List
  
  
  def convert_to_csharp(python_code: List[str]) -> List[str]:
      """ Convert a given Python function to a C# method.
      >>> convert_to_csharp(['def power(x, y):', '    if y == 0:', '        return 1', '    else:', '        return x * power(x, y - 1)'])
      ['public int Power(int x, int y)', '{', '    if (y == 0)', '    {', '        return 1;', '    }', '    else', '    {', '        return x * Power(x, y - 1);', '    }', '}']
      """
output:     csharp_code = []
      for line in python_code:
          line = line.strip()
          if line.startswith("def "):
              method_name = line[4:line.index("(")]
              params = line[line.index("(") + 1:line.index(")")]
              param_list = [f"int {p.strip()}" for p in params.split(",")]
              csharp_code.append(f"public int {method_name}({', '.join(param_list)})")
              csharp_code.append("{")
          elif line.startswith("if "):
              csharp_code.append(f"    if ({line[3:]})")
              csharp_code.append("    {")
          elif line.startswith("else:"):
              csharp_code.append("    }")
              csharp_code.append("    else")
              csharp_code.append("    {")
          elif line.startswith("return "):
              csharp_code.append(f"        return {line[7:]};")
          elif line == "":
              csharp_code.append("    }")
              csharp_code.append("}")
      return csharp_code