input: Write a function to convert a given Python program to a C# program. The function should take the Python code as a string and return the equivalent C# code as a string. If the input Python code 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}"
  assert convert_python_to_csharp("def greet(name):\n    return f\"Hello, {name}\"")=="public string Greet(string name)\n{\n    return $\"Hello, {name}\";\n}"
output: def convert_python_to_csharp(python_code):
      if not python_code:
          return ""
      
      lines = python_code.split('\n')
      csharp_code = []
      
      for line in lines:
          if line.startswith("def "):
              function_name, params = line[4:].split('(')
              params = params.rstrip(':').rstrip(')').split(', ')
              param_types = []
              for param in params:
                  param_name, param_type = param.split(': ')
                  if param_type == 'int':
                      param_types.append(f"int {param_name}")
                  elif param_type == 'str':
                      param_types.append(f"string {param_name}")
              return_type = 'int' if 'int' in param_type else 'string'
              csharp_code.append(f"public {return_type} {function_name}({', '.join(param_types)})")
              csharp_code.append("{")
          elif line.startswith("    return "):
              return_value = line[11:]
              if return_value.startswith('f"'):
                  return_value = return_value.replace('f"', '$"')
              csharp_code.append(f"    return {return_value};")
          elif line.startswith("    "):
              csharp_code.append(line)
          elif line == "":
              csharp_code.append("}")
      
      return '\n'.join(csharp_code)