WCF Tutorial: WCF Service with Windows Service (Part 3 of 3)

Just a stub Creating Service Contract Creating DataContract Creating FaultContract Creating Windows Service Host Creating Proxy Creating Client Creating app.config with WCF config Editor in Microsoft Visual Studio 2010 Installing/Uninstalling/Starting/Stopping Windows Service Host with sc.exe Use client to connect proxy to host, and consuming services. Programatically configure service and proxy using and without using app.config […]

Read more
WCF Tutorial: WCF Overview (part 1 of 3)

Just a stub first: WCF is Windows Communications Foundation By default, it sends message using SOAP protocol by serializing data structures into XML. For serialization, it specifies the DataContract and DataMember attributes. For Interface programming, it specifies the ServiceContract and OperationContract attributes. For Error and Exception handling, it specifies the FaultContract attribute. Language agnostic (the […]

Read more
One-to-many mappings

A lot of times I had to look for a data structure to store one to many relationships such as a list of products keyed by their categories. I remember the last time I coded in C++ I used a whole lot of std::multimap to do just this. With C#, there isn’t such a container. […]

Read more
C# static initialization sequence

Object orientated code could break down dangerously when using static class members in an unorthodox manner. Static initialization sequence goes like this: 1. Program starts, mark all classes that has static members as statically uninitialized. 2. Enters a scope where static calls are made. 3. Check, in order of execution sequence, get the first class […]

Read more
ObjectGridView – An easier way to use DataGridView

With a project that I am currently working on, I frequently need to display object information in a DataGridView. However, the values that needs to be displayed does not always directly belong to the bounded objects, instead, it is often a value related to the objects. Furthermore the DataGridView only accepts an IList of objects […]

Read more