input: from typing import List
  
  def convert_to_csharp(python_code: List[str]) -> List[str]:
      """ Converts a given Python program to a C# program. Each line of the Python
      code should be provided as an element in the list. The function returns a
      list of C# code lines. 
      >>> 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)', '{', '    if (y == 0)', '    {', '        return 1;', '    }', '    else', '    {', '        return x * Power(x, y - 1);', '    }', '}']
      """
output:     csharp_code = []
      indent_level = 0
      for line in python_code:
          line = line.strip()
          if line.endswith(':'):
              line = line[:-1].rstrip()
              if line.startswith('def '):
                  line = line.replace('def ', 'public ').replace(':', '')
                  line += ')'
                  if '->' in line:
                      return_type = line.split('->')[1].strip()
                      line = line.split('->')[0].strip() + return_type
                  else:
                      line += 'void'
                  line += ' {'
              elif line.startswith('if '):
                  line = 'if (' + line[3:] + ')'
              elif line.startswith('else:'):
                  line = 'else'
              elif line.startswith('elif '):
                  line = 'else if (' + line[5:] + ')'
              csharp_code.append('    ' * indent_level + line)
              indent_level += 1
          else:
              if line.startswith('return '):
                  line = line + ';'
              csharp_code.append('    ' * indent_level + line)
              if line.endswith('}'):
                  indent_level -= 1
      return csharp_code