input: from typing import Dict
  
  def convert_to_csharp(func: str) -> str:
      """ Convert a given Python function to its C# equivalent.
      >>> convert_to_csharp("""def power(x, y):\n    if y == 0:\n        return 1\n    else:\n        return x * power(x, y - 1)\n""")
      '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:     func = func.strip()
      lines = func.split('\n')
      csharp_lines = []
  
      for line in lines:
          if line.startswith('def '):
              line = line.replace('def ', 'public ').replace(':', '')
              line = line.replace('(', '(int ').replace(', ', ', int ')
              line += ')'
              csharp_lines.append(line)
          elif line.startswith('    if '):
              line = line.replace('if ', 'if (').replace(':', ')')
              csharp_lines.append(line)
          elif line.startswith('    else:'):
              line = line.replace('else:', 'else')
              csharp_lines.append(line)
          elif line.startswith('    return '):
              line = line.replace('return ', 'return ') + ';'
              csharp_lines.append(line)
          else:
              csharp_lines.append(line)
  
      csharp_func = '{\n' + '\n'.join(['    ' + line for line in csharp_lines[1:]]) + '\n}'
      return csharp_lines[0] + '\n' + csharp_func