input: Write a function to convert a given Python program to a C# program. The function should take a Python function as input and return the equivalent C# function as output.
  assert convert_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_to_csharp("def add(x, y):\n    return x + y")=="public int Add(int x, int y)\n{\n    return x + y;\n}"
  assert convert_to_csharp("def hello():\n    print('Hello, World!')")=="public void Hello()\n{\n    Console.WriteLine(\"Hello, World!\");\n}"
output: def convert_to_csharp(python_code):
      lines = python_code.strip().split('\n')
      function_name = lines[0].split('(')[0].split(' ')[1]
      parameters = lines[0].split('(')[1].split(')')[0].split(', ')
      csharp_params = ', '.join([f'int {param}' for param in parameters])
      csharp_code = f"public int {function_name.capitalize()}({csharp_params})\n{{\n"
      
      for line in lines[1:]:
          if 'return' in line:
              csharp_code += f"    return {line.split(' ')[1]};\n"
          elif 'print' in line:
              message = line.split('(')[1].split(')')[0].strip("'")
              csharp_code += f'    Console.WriteLine("{message}");\n'
          elif 'if' in line:
              condition = line.split('if ')[1].split(':')[0]
              csharp_code += f'    if ({condition})\n    {{\n'
          elif 'else' in line:
              csharp_code += '    }\n    else\n    {\n'
          elif 'power(' in line:
              csharp_code += f'        return x * {function_name.capitalize()}(x, y - 1);\n'
      
      csharp_code += '}\n'
      return csharp_code