input: Write a function to convert the given Python program to a C# program. If the input is a Python function, return the equivalent C# function. If the input is empty, return an empty string.
  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("") == ""
  assert convert_python_to_csharp("def add(a, b):\n    return a + b") == "public int Add(int a, int b)\n{\n    return a + b;\n}"
output: def convert_python_to_csharp(python_code):
      if not python_code:
          return ""
      
      lines = python_code.strip().split('\n')
      function_name = lines[0].split('(')[0].split(' ')[1]
      parameters = lines[0].split('(')[1].split(')')[0].split(', ')
      param_types = ['int ' + param for param in parameters]
      param_string = ', '.join(param_types)
      
      csharp_function = f"public int {function_name.capitalize()}({param_string})\n{{\n"
      
      for line in lines[1:]:
          line = line.replace('return', 'return ')
          line = line.replace('def', 'public')
          line = line.replace(':', '')
          line = line.replace('else:', 'else')
          line = line.replace('if', 'if (')
          line = line.replace('==', ' == ')
          line = line.replace('!=', ' != ')
          line = line.replace('and', '&&')
          line = line.replace('or', '||')
          line = line.replace('True', 'true')
          line = line.replace('False', 'false')
          line = line.replace('None', 'null')
          line = line.replace('print', 'Console.WriteLine')
          line = line.replace('input', 'Console.ReadLine')
          line = line.replace('int(', 'int.Parse(')
          line = line.replace('float(', 'float.Parse(')
          line = line.replace('str(', 'Convert.ToString(')
          line = line.replace('list(', 'new List<int>(')
          line = line.replace('dict(', 'new Dictionary<int, int>(')
          line = line.replace('set(', 'new HashSet<int>(')
          line = line.replace('len(', 'Count(')
          line = line.replace('range(', 'Enumerable.Range(')
          line = line.replace('enumerate(', 'Enumerable.Range(0, ').replace('))', ').Select(i => new { Index = i, Value = ').replace(')', ' }).ToList()')
          line = line.replace('zip(', 'Enumerable.Zip(')
          line = line.replace('map(', 'Enumerable.Select(')
          line = line.replace('filter(', 'Enumerable.Where(')
          line = line.replace('sorted(', 'Enumerable.OrderBy(')
          line = line.replace('reversed(', 'Enumerable.Reverse(')
          line = line.replace('min(', 'Enumerable.Min(')
          line = line.replace('max(', 'Enumerable.Max(')
          line = line.replace('sum(', 'Enumerable.Sum(')
          line = line.replace('any(', 'Enumerable.Any(')
          line = line.replace('all(', 'Enumerable.All(')
          line = line.replace('isinstance(', 'is ').replace(')', ')')
          line = line.replace('type(', 'typeof(')
          line = line.replace('is', '==')
          line = line.replace('not', '!')
          line = line.replace('in', 'Contains')
          line = line.replace('for', 'foreach')
          line = line.replace('while', 'while (')
          line = line.replace('break', 'break;')
          line = line.replace('continue', 'continue;')
          line = line.replace('pass', '// pass')
          line = line.replace('raise', 'throw new')
          line = line.replace('try:', 'try\n{').replace('except', 'catch').replace(':', '\n{')
          line = line.replace('finally:', 'finally\n{')
          line = line.replace('with', 'using')
          line = line.replace('as', '=')
          line = line.replace('global', 'public static')
          line = line.replace('nonlocal', 'public static')
          line = line.replace('lambda', 'delegate')
          line = line.replace('yield', 'yield return')
          line = line.replace('async', 'async').replace('await', 'await ')
          line = line.replace('assert', 'Debug.Assert')
          line = line.replace('import', 'using')
          line = line.replace('from', 'using')
          line = line.replace('class', 'public class')
          line = line.replace('self', 'this')
          line = line.replace('__init__', 'public ' + function_name.capitalize() + '(' + param_string + ')')
          line = line.replace('__str__', 'public override string ToString()')
          line = line.replace('__repr__', 'public override string ToString()')
          line = line.replace('__eq__', 'public static bool operator ==(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__ne__', 'public static bool operator !=(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__lt__', 'public static bool operator <(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__le__', 'public static bool operator <=(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__gt__', 'public static bool operator >(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__ge__', 'public static bool operator >=(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__add__', 'public static ' + function_name.capitalize() + ' operator +(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__sub__', 'public static ' + function_name.capitalize() + ' operator -(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__mul__', 'public static ' + function_name.capitalize() + ' operator *(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__truediv__', 'public static ' + function_name.capitalize() + ' operator /(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__floordiv__', 'public static ' + function_name.capitalize() + ' operator /(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__mod__', 'public static ' + function_name.capitalize() + ' operator %(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__pow__', 'public static ' + function_name.capitalize() + ' operator ^(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__and__', 'public static ' + function_name.capitalize() + ' operator &(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__or__', 'public static ' + function_name.capitalize() + ' operator |(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__xor__', 'public static ' + function_name.capitalize() + ' operator ^(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__lshift__', 'public static ' + function_name.capitalize() + ' operator <<(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__rshift__', 'public static ' + function_name.capitalize() + ' operator >(' + function_name.capitalize() + ' left, ' + function_name.capitalize() + ' right)')
          line = line.replace('__invert__', 'public static ' + function_name.capitalize() + ' operator ~(' + function_name.capitalize() + ' left)')
          line = line.replace('__neg__', 'public static ' + function_name.capitalize() + ' operator -(' + function_name.capitalize() + ' left)')
          line = line.replace('__pos__', 'public static ' + function_name.capitalize() + ' operator +(' + function_name.capitalize() + ' left)')
          line = line.replace('__abs__', 'public static ' + function_name.capitalize() + ' operator abs(' + function_name.capitalize() + ' left)')
          line = line.replace('__round__', 'public static ' + function_name.capitalize() + ' operator round(' + function_name.capitalize() + ' left)')
          line = line.replace('__floor__', 'public static ' + function_name.capitalize() + ' operator floor(' + function_name.capitalize() + ' left)')
          line = line.replace('__ceil__', 'public static ' + function_name.capitalize() + ' operator ceil(' + function_name.capitalize() + ' left)')
          line = line.replace('__trunc__', 'public static ' + function_name.capitalize() + ' operator trunc(' + function_name.capitalize() + ' left)')
          line = line.replace('__complex__', 'public static ' + function_name.capitalize() + ' operator complex(' + function_name.capitalize() + ' left)')
          line = line.replace('__int__', 'public static ' + function_name.capitalize() + ' operator int(' + function_name.capitalize() + ' left)')
          line = line.replace('__float__', 'public static ' + function_name.capitalize() + ' operator float(' + function_name.capitalize() + ' left)')
          line = line.replace('__bool__', 'public static ' + function_name.capitalize() + ' operator bool(' + function_name.capitalize() + ' left)')
          line = line.replace('__bytes__', 'public static ' + function_name.capitalize() + ' operator bytes(' + function_name.capitalize() + ' left)')
          line = line.replace('__format__', 'public static ' + function_name.capitalize() + ' operator format(' + function_name.capitalize() + ' left)')
          line = line.replace('__hash__', 'public static ' + function_name.capitalize() + ' operator hash(' + function_name.capitalize() + ' left)')
          line = line.replace('__sizeof__', 'public static ' + function_name.capitalize() + ' operator sizeof(' + function_name.capitalize() + ' left)')
          line = line.replace('__dir__', 'public static ' + function_name.capitalize() + ' operator dir(' + function_name.capitalize() + ' left)')
          line = line.replace('__getattr__', 'public static ' + function_name.capitalize() + ' operator getattr(' + function_name.capitalize() + ' left)')
          line = line.replace('__setattr__', 'public static ' + function_name.capitalize() + ' operator setattr(' + function_name.capitalize() + ' left)')
          line = line.replace('__delattr__', 'public static ' + function_name.capitalize() + ' operator delattr(' + function_name.capitalize() + ' left)')
          line = line.replace('__getattribute__', 'public static ' + function_name.capitalize() + ' operator getattribute(' + function_name.capitalize() + ' left)')
          line = line.replace('__setitem__', 'public static ' + function_name.capitalize() + ' operator setitem(' + function_name.capitalize() + ' left)')
          line = line.replace('__delitem__', 'public static ' + function_name.capitalize() + ' operator delitem(' + function_name.capitalize() + ' left)')
          line = line.replace('__getitem__', 'public static ' + function_name.capitalize() + ' operator getitem(' + function_name.capitalize() + ' left)')
          line = line.replace('__iter__', 'public static ' + function_name.capitalize() + ' operator iter(' + function_name.capitalize() + ' left)')
          line = line.replace('__next__', 'public static ' + function_name.capitalize() + ' operator next(' + function_name.capitalize() + ' left)')
          line = line.replace('__reversed__', 'public static ' + function_name.capitalize() + ' operator reversed(' + function_name.capitalize() + ' left)')
          line = line.replace('__contains__', 'public static ' + function_name.capitalize() + ' operator contains(' + function_name.capitalize() + ' left)')
          line = line.replace('__len__', 'public static ' + function_name.capitalize() + ' operator len(' + function_name.capitalize() + ' left)')
          line = line.replace('__call__', 'public static ' + function_name.capitalize() + ' operator call(' + function_name.capitalize() + ' left)')
          line = line.replace('__enter__', 'public static ' + function_name.capitalize() + ' operator enter(' + function_name.capitalize() + ' left)')
          line = line.replace('__exit__', 'public static ' + function_name.capitalize() + ' operator exit(' + function_name.capitalize() + ' left)')
          line = line.replace('__await__', 'public static ' + function_name.capitalize() + ' operator await(' + function_name.capitalize() + ' left)')
          line = line.replace('__aiter__', 'public static ' + function_name.capitalize() + ' operator aiter(' + function_name.capitalize() + ' left)')
          line = line.replace('__anext__', 'public static ' + function_name.capitalize() + ' operator anext(' + function_name.capitalize() + ' left)')
          line = line.replace('__aenter__', 'public static ' + function_name.capitalize() + ' operator aenter(' + function_name.capitalize() + ' left)')
          line = line.replace('__aexit__', 'public static ' + function_name.capitalize() + ' operator aexit(' + function_name.capitalize() + ' left)')
          line = line.replace('__iadd__', 'public static ' + function_name.capitalize() + ' operator +=(' + function_name.capitalize() + ' left)')
          line = line.replace('__isub__', 'public static ' + function_name.capitalize() + ' operator -=(' + function_name.capitalize() + ' left)')
          line = line.replace('__imul__', 'public static ' + function_name.capitalize() + ' operator *=(' + function_name.capitalize() + ' left)')
          line = line.replace('__itruediv__', 'public static ' + function_name.capitalize() + ' operator /=(' + function_name.capitalize() + ' left)')
          line = line.replace('__ifloordiv__', 'public static ' + function_name.capitalize() + ' operator /=(' + function_name.capitalize() + ' left)')
          line = line.replace('__imod__', 'public static ' + function_name.capitalize() + ' operator %=(' + function_name.capitalize() + ' left)')
          line = line.replace('__ipow__', 'public static ' + function_name.capitalize() + ' operator ^=(' + function_name.capitalize() + ' left)')
          line = line.replace('__iand__', 'public static ' + function_name.capitalize() + ' operator &=(' + function_name.capitalize() + ' left)')
          line = line.replace('__ior__', 'public static ' + function_name.capitalize() + ' operator |=(' + function_name.capitalize() + ' left)')
          line = line.replace('__ixor__', 'public static ' + function_name.capitalize() + ' operator ^=(' + function_name.capitalize() + ' left)')
          line = line.replace('__ilshift__', 'public static ' + function_name.capitalize() + ' operator <<=(' + function_name.capitalize() + ' left)')
          line = line.replace('__irshift__', 'public static ' + function_name.capitalize() + ' operator >>=(' + function_name.capitalize() + ' left