Using linq? and XML is there a way to convert this IEnumerable to a string array of the value parameter?
List<string> idList = new List<string>();
foreach (XElement idElement in word.Elements("id"))
{
idList.Add(idElement.Value);
}
string[] ids = idList.ToArray();
It would be similar to this
But I need the XElement.Value parameter
IEnumerable query = ...;
MyEntityType[] array = query.Cast<MyEntityType>().ToArray();