Renvoi de types de chaînes nullables

J'ai donc quelque chose comme ceci

public string? SessionValue(string key)
{
    if (HttpContext.Current.Session[key].ToString() == null || HttpContext.Current.Session[key].ToString() == "")
        return null;

    return HttpContext.Current.Session[key].ToString();
}

qui ne compile pas.

Comment puis-je retourner un nullable type de chaîne?

source d'informationauteur sarsnake