I got an error trying to define variable type Text in C#

I am trying to edit a text in a canvas from C# script i found from:

that I need to define a variable type Text but I receive an error trying to define Text variable:
Text messag = canvastemp.GetComponent();

The name ‘Text’ doesn’t exist in the current context.

Why is that?

Problem solved…
I just needed to add using UnityEngine.UI; in the beginning