public Image not working C#

I have been stuck on this for a very long time, I am trying to create one of the boxes that show up in the inspector that you can drop gameobjects into, and I have created the following script:

using UnityEngine;
using System.Collections;

public class Radar : MonoBehaviour {

public Image Arrow;

void OnTriggerEnter( Collider other) {
	if (other.gameObject.tag == "Enemy")
		Arrow.SetActive(true);
}

}

The part with “public Image” is what is causing the problem, I have looked at other successful scripts that use this statement, but mine will not work, HELP!

SetActive can only be used for GameObjects.What do you mean by Image datatype?
If you are refering Image component of a gameobject,if so your script should be like this.

using UnityEngine; 
using System.Collections;
using UnityEngine.UI;

public class Radar : MonoBehaviour {

 public Image Arrow;
 void OnTriggerEnter( Collider other) {
     if (other.gameObject.tag == "Enemy")
         Arrow.gameObject.SetActive(true);
 }
}

@Guhanesh does this method still work or is it different for the 2019 version