DCSIMG
Google+ Linq - Doron's .NET Space

Browse by Tags

All Tags » Linq (RSS)
Suppose you have a collection of objects, and you want only the distinct values. You could easily use Linq for this, like that: var items = new [] { "BMW" , "Fiat" , "Ferrari" , "Fiat" }; var distinctItems = items.Distinct(); This uses the default comparer for the objects in order to see if they’re equal. There’s also another overload, which lets you specify your own comparer. This is its signature: public static IEnumerable<TSource> Distinct<TSource>...
Posted by dorony | 2 comment(s)
תגים:,
This is the first of a couple of tips I would like to share reguarding WPF. WPF binding is extremely powerful, but you are bound to run into a few issues, especially if, like myself, you have no WinForms experience. As I was writing my small LiveSpaceToBlogML GUI , I used binding in order to populate an object called ConversionOptions, which pretty much held all the data on the form. The form look something like this (a pretty simplified version, in order to focus on what matters): < Window x...
Posted by dorony | 11 comment(s)
תגים:, , , ,