Directory Freebies VS CheatSheet Forum

RSS

Email

Translate

Home About Archive Privacy Contact Advertise Write for Dev102
Posted by Shahar A on May 15th, 2008 | Filed under .Net, C# | 6 Comments

Did you ever need to convert List(T1) to List(T2)? One example might be when implementing an interface. you might need to expose a collection of other interfaces (or maybe the same interface), But you usually hold the concrete type implementing the interface in the collection. Lets look at the following example:


Continue Reading...
Posted by Shahar A on Apr 10th, 2008 | Filed under .Net, C# | 11 Comments

We use collections all the time. Many times we have to expose them to users of our classes. Lets look at this simple tree node class:
class TreeNode
{
private List<TreeNode> children = new List<TreeNode>();

public IList<TreeNode> Children
{
[...]


Continue Reading...

Often we want to display a list of elements and allow the user to sort them in various ways. There are many ways to do it and I wanted to show you how to use a SortDescription Object. What is a SortDescription object you ask? It receives two parameters in its constructor: the first is [...]


Continue Reading...
Write Article for Dev102

Write for Dev102!

We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution

Learn More