Activating A Text After My Char Dies

Hey,
I want to activate a Text after my character dies. I can activate a Sprite like that way in c#:

public GameObject variable;

variable.SetActive(true);

i think you know what i mean. i am new to this kind of things.
but when i try to activate my text i cant do it like that. what is the way to do it?
thanks

Look at docs on TextMesh; you could Instantiate that and change TextMesh.text = “The End.”