Trouble with IEnumerable<XElement> [C# - Unity 4.3.4]

Hi all !

I’m trying to create a Launcher for my project.
I use VS to create the launcher with a Creation of a Xml file whit Setup Value [Resolution / Windowed].

I need to read the Xml file in Unity, I use Lynq to XML, but Unity send me this :

using UnityEngine;
using System.Collections;
using System.Xml.Linq;
using System.IO;

public class ReadXML : MonoBehaviour {

	public string adressHardDisk;
	public XElement dataXml;

	// Use this for initialization
	void Start () {
		dataXml = XElement.Load(adressHardDisk);
		IEnumerable<XElement> data = dataXml.Elements ();
		foreach (XElement item in data) 
		{
			Debug.Log(item.Element("Width").Value);
			Debug.Log (item.Element("Heigth").Value);
		}
	}
}

Actualy I just want to Set the Resolution choose in Launcher. I can’t test the Read of XML File cause of the error that I wrote before… When I search on the internet, everyone use :

IEnumerable<XElement / XmlElement>, and don’t have any problem…

Someone can help me plz ?

IEnumerable<XElement> elements =
    from el in xmlTree.Elements()
    where (int)el <= 3
    select el;

This is from the documentation.
Perhaps try this. I have never worked with XElement, but this should work. I feel like there is a better way, but if this works it will be moving in th eright direction.

IEnumerable<XElement> data = from d in dataXml.Elements () select d;

Not sure… but I think you’re missing;

using System.Collections.Generic;

at the top.