Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
swdev:dotnet:lists_and_observablecollections [2013/03/14 15:24] smayr created |
swdev:dotnet:lists_and_observablecollections [2013/03/14 15:35] (current) smayr |
||
---|---|---|---|
Line 19: | Line 19: | ||
Create a color list: | Create a color list: | ||
<code csharp> | <code csharp> | ||
+ | using System.Linq; | ||
+ | using System.Collections.ObjectModel; | ||
+ | |||
public class TColorList: List< | public class TColorList: List< | ||
{ | { | ||
+ | /// | ||
+ | /// Constructor | ||
+ | /// | ||
+ | public TColorList() | ||
+ | { | ||
+ | | ||
+ | } | ||
+ | | ||
+ | /// | ||
+ | /// Populate list | ||
+ | /// | ||
+ | private void PopulateList() | ||
+ | { | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
} | } | ||
Line 51: | Line 71: | ||
{ | { | ||
get { return this.Where(n => n.Type == aColorType).SingleOrDefault(); | get { return this.Where(n => n.Type == aColorType).SingleOrDefault(); | ||
+ | } | ||
+ | | ||
+ | /// | ||
+ | /// Constructor | ||
+ | /// | ||
+ | public TColorCollection() | ||
+ | { | ||
+ | | ||
+ | } | ||
+ | | ||
+ | /// | ||
+ | /// Populate collection | ||
+ | /// | ||
+ | private void PopulateCollection() | ||
+ | { | ||
+ | | ||
+ | | ||
+ | | ||
} | } | ||
} | } | ||
</ | </ |