Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,
Can anyone tell me how to declare and use the Ilist in wpf ?
I'm making a project for my university that involves getting a series of points from a depth image so I want to save these points in an Ilist.
Thanks in advance
Posted

IList is an interface. You can implement it like IList[^]

If you want to save points in a collection you can use List,Hashtable, Dictionary.
 
Share this answer
 
I'm not sure what you really want from us here. IList<T> is merely an interface that is implemented in collections such as List<T> and so on. What are your requirements?
 
Share this answer
 
Comments
Makbg 24-May-12 8:58am    
can you provide me a sample code using the List<t> ?
Pete O'Hanlon 24-May-12 9:09am    
IList<string> mystrings = new List<string>(); It's as simple as that.
Makbg 24-May-12 9:14am    
it's giving me an error on the IList<> , Is there any reference to include ?
Pete O'Hanlon 24-May-12 9:20am    
you need to add System.Collections.Generic to your using section, like this:<pre lang="c#">using System.Collections.Generic;</pre>
Makbg 24-May-12 9:25am    
Thanks , that's what was missing :)
Hi,

Whether you are using WPF, Winforms, Asp.net C# is the same. IList is part of System.Collections.Generic namespace.. Please refer the below links..

http://www.aspnettutorials.com/tutorials/advanced/ilist-aspnet2-csharp.aspx

http://www1.cs.columbia.edu/~lok/csharp/refdocs/System.Collections/types/IList.html


http://www.java2s.com/Tutorial/CSharp/0220__Data-Structure/0700__IList.htm


All the best for your project!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900