input: Write a function to convert a given Python program to a C# program. Ensure that the function retains the same logic and functionality. The function should return the C# equivalent of the provided Python function.
  
  ConvertToCSharp(def power(x, y):
      if y == 0:
          return 1
      else:
          return x * power(x, y - 1))
  
  assert ConvertToCSharp(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}"
  assert ConvertToCSharp(def add(a, b):
      return a + b)=="public int Add(int a, int b)\n{\n    return a + b;\n}"
  assert ConvertToCSharp(def multiply(a, b):
      return a * b)=="public int Multiply(int a, int b)\n{\n    return a * b;\n}"
  assert ConvertToCSharp(def subtract(a, b):
      return a - b)=="public int Subtract(int a, int b)\n{\n    return a - b;\n}"
output: def ConvertToCSharp(func_str):
      func_name = func_str.split('(')[0].split()[-1]
      params = func_str.split('(')[1].split(')')[0].split(', ')
      param_types = 'int ' * len(params)
      param_list = ', '.join([f'int {p}' for p in params])
      func_body = func_str.split(':')[1].strip()
      func_body = func_body.replace('return ', 'return ').replace('if ', 'if (').replace(':', ')').replace('else:', 'else')
      func_body = func_body.replace('def ', 'public int ').replace('):', f'){{\n    {func_body.replace("    ", "    ")}\n}}')
      return f'public int {func_name}({param_list})\n{{\n    {func_body}\n}}'