input: Write a function to convert a given Python program to a C# program. The function should take a string representation of a Python function and return a string representation of the corresponding C# function. If the input is invalid, return an error message.
  assert convert_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 convert_python_to_csharp("")== "Error: Invalid input"
output: def convert_python_to_csharp(python_code):
      if not python_code.strip():
          return "Error: Invalid input"
      
      lines = python_code.split('\n')
      if not lines[0].startswith("def "):
          return "Error: Invalid input"
      
      function_name = lines[0].split('(')[0][4:]
      parameters = lines[0].split('(')[1].split(')')[0].split(', ')
      param_types = ['int'] * len(parameters)
      param_list = ', '.join([f"{t} {p}" for t, p in zip(param_types, parameters)])
      
      csharp_function = f"public int {function_name}({param_list})\n{{\n"
      
      for line in lines[1:]:
          if line.strip().startswith("return "):
              csharp_function += f"    return {line[6:]};\n"
          elif line.strip().startswith("if "):
              csharp_function += f"    if ({line[2:].strip()})\n    {{\n"
          elif line.strip().startswith("else:"):
              csharp_function += "    }\n    else\n    {\n"
          elif line.strip() == "":
              continue
          else:
              csharp_function += f"        {line.strip()}\n"
      
      csharp_function += "    }\n}"
      
      return csharp_function