input: from typing import List
  
  def convert_to_csharp(python_function: str) -> 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)\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_function.strip().split('\n')
      csharp_method = []
      csharp_method.append(f"public int {lines[0].split('(')[0].split(' ')[1]}(int {lines[0].split('(')[1].split(',')[0]}, int {lines[0].split('(')[1].split(',')[1].split(')')[0]})")
      csharp_method.append("{")
      for line in lines[1:]:
          if line.strip().startswith("if"):
              csharp_method.append(f"    {line.strip().replace(':', '')}")
              csharp_method.append("    {")
          elif line.strip().startswith("return"):
              csharp_method.append(f"        {line.strip().replace('return', 'return ').replace('power', 'Power')};")
          elif line.strip().startswith("else"):
              csharp_method.append("    }")
              csharp_method.append(f"    {line.strip().replace(':', '')}")
              csharp_method.append("    {")
      csharp_method.append("    }")
      csharp_method.append("}")
      return '\n'.join(csharp_method)