In .NET, it is commonplace to use byte arrays when working with binary data; for example, passing the contents of a file between methods, encoding/decoding text, reading data from sockets, etc. These arrays can get quite large (up to megabytes in size), which can eventually lead to OutOfMemoryException being thrown if the runtime is unable… Continue reading

This article is also available as a video, courtesy of Webucator. Click here to jump to the video section below.   For many data types, sorting is a logical, deterministic operation that works by comparing elements and determining whether they are less-than, greater-than or equal-to each other. For example, with a list of integers, we can… Continue reading

Foreword: There’s actually no Media Center-specific content in this post, but it’s the logical continuation of the series… Background Add-In – A Queue-Based Download Manager Last time, we talked about using a Media Center-hosted WCF service as the basic architecture for the networking browsing and file copying add-in. This time, we’re looking at how that… Continue reading

In the last post, I introduced a command button for use in Media Center add-ons. In doing so, I demonstrated the idea of input focus, Command objects and rules to dictate behaviour and data-binding. All of these concepts are transferrable to this instalment’s topic: A List Control (with Selected Item Tracking) A simple way of… Continue reading

Presents sequences (instances of IEnumerable or IEnumerable) as logical aggregations of data as an alternative to the traditional view of a persistent collection. Demonstrates how LINQ operators treat both persisted and non-persisted sequences equally (even infinite sequences). Introduces the LINQ Concat<> operator and explains how its result can be used like a database view. Shows how to bind controls to instances of IEnumerable using a list wrapper, as well as explaining the advantages presented by doing so. Continue reading