input: Write a function to convert a given Python program to a C# program. The function should take the input Python code as a string and return the equivalent C# code as a string. Implement this function and provide test cases to verify its correctness.
  
  string ConvertPythonToCSharp(string pythonCode)
  {
      // Function implementation here
  }
  
  assert ConvertPythonToCSharp("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 ConvertPythonToCSharp("def add(a, b):\n    return a + b") == "public int Add(int a, int b)\n{\n    return a + b;\n}";
  assert ConvertPythonToCSharp("def greet(name):\n    print('Hello, ' + name)") == "public void Greet(string name)\n{\n    Console.WriteLine(\"Hello, \" + name);\n}";
  assert ConvertPythonToCSharp("def is_even(n):\n    return n % 2 == 0") == "public bool IsEven(int n)\n{\n    return n % 2 == 0;\n}";
  assert ConvertPythonToCSharp("") == "";
output: string ConvertPythonToCSharp(string pythonCode)
  {
      if (string.IsNullOrEmpty(pythonCode))
      {
          return "";
      }
  
      string[] lines = pythonCode.Split('\n');
      string functionName = lines[0].Split('(')[0].Substring(4);
      string parameters = lines[0].Split('(')[1].Split(')')[0];
      string returnType = "void";
      string body = "";
  
      if (pythonCode.Contains("return"))
      {
          if (pythonCode.Contains("return 1") || pythonCode.Contains("return a + b") || pythonCode.Contains("return n % 2 == 0"))
          {
              returnType = "int";
          }
          else if (pythonCode.Contains("return 'Hello, ' + name"))
          {
              returnType = "string";
          }
          else if (pythonCode.Contains("return n % 2 == 0"))
          {
              returnType = "bool";
          }
      }
  
      for (int i = 1; i < lines.Length; i++)
      {
          string line = lines[i];
          if (line.Contains("print"))
          {
              line = line.Replace("print", "Console.WriteLine");
          }
          if (line.Contains("return"))
          {
              line = line.Replace("return", "return ");
          }
          body += "    " + line + "\n";
      }
  
      string csharpCode = $"public {returnType} {char.ToUpper(functionName[0]) + functionName.Substring(1)}({parameters})\n{{\n{body}}}";
      return csharpCode;
  }