I have made a class :
public class Node
{
public int Id { get; set; }
public string Name { get; set;}
public List<Node> Successor { get; set; }
}
and in some method i want to do the following
partice.path= new LinkedList<Node>();
but i cant reach the “.elementat()” method and other extensions.
ps: all the classes above are in silverlight class library,i don’t know if it is relevant to the error.
It’s not clear if you’re using the framework classes (as suggested in the title) or your own class, given your
Nodedeclaration…If you’re using the framework classes, make sure to include:
At the top of your file. Also, make sure to include a reference to
System.Core.dllin your project.If you’re using your own class, and you want to use the Enumerable.ElementAt extension method, you need to make your class implement
IEnumerable<T>.That being said, you might want to just use the framework’s
LinkedList<T>class instead of rolling your own…