Error CS0305: Using the generic type `System.Collections.Generic.IEnumerator' requires `1' type argument(s)

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

// Dialogue Manager to show popup window with text
public class DialogueManager : MonoBehaviour {

public Text textText;
public Text diagnoseText;
public Animator animator;

public Queue<string> sentences;
//public string[] sentences;

void  Start (){
	sentences = newQueue<string> ();
}

public void StartDialogue (Dialogue dialogue)
{
	animator.SetBool ("IsOpen", true);

	nameText.text = dialogue.name;

	foreach (string sentence in dialogue.sentences) {
		sentence.Enqueue (sentence);
	}
	DisplayNextSentence();
}

public void DisplayNextSentence()
{
	if (sentences.Count == 0)
	{
		EndDialogue();
		Return;
	}

	string sentences = sentence.Dequeue();
	StopAllCoroutine();
	StartCoroutine(TypeSentence(sentence));

}

IEnumerator TypeSentence (string sentence)
{
	diagnoseText.text = "";
	foreach (char letter in sentence.ToCharArray())
	{
		diagnoseText.text += letter;
		yield return null;
	}
}

void EndDialogue()
{
	animator.SetBool ("IsOpen", false);
}

}

Ok the code you posted is a complete mess. I will assume that it is like that because you re-wrote it here instead of copy-pasting it and then formatting. So ignoring all of the errors there (return with capital “R”, local variables names colliding with field names, wrong method names like StopAllCoroutine, and the field nameText that doesn’t exist), the problem is that you are missing a using statement. Add this one on top of your file:

using System.Collections;

System.Collections.Generic (the one you have right now) contains a generic version of the IEnumerator class. However, the one you need is the non generic one and that one is contained inside System.Collections, thus the error.