Cool new C# 3.0 syntactic sugar
I was recently reading a post on MSDN blogs by Abhinaba Basu about a new feature in C# 3.0 and Visual Studio 2008 (Orcas)—Automatic Properties.
Coming from a Visual Basic background, I never really understood why C# forces you to do some things the hard way, even when it knows by itself what you meant to do, and it could have done it for you in the first place. (more…)
Bookmark on del.icio.usOwner-drawing a Windows.Forms TextBox
This article describes how SharpSpell is able to modify existing TextBox controls to display wavy red underlines below misspelled words.
Here’s an image to demonstrate what I mean:

(This image is borrowed from SharpSpell, but you get the point) (more…)
Calling a Windows Service from ASP.NET via Remoting & IpcChannel
I recently had to design a Windows Service that connects to several game servers via UDP, gathers stats, and then updates a MSSQL database.
These stats were then made available in real-time on a web-site written in C# and ASP.NET.
Before Remoting
For the first version of the application, the web-site and Windows Service were completely independent. The web-site would just query the database and determine, or make a best guess about what was going on inside the Windows Service at that exact time. This worked pretty good, and although the database is now about 1GB in size and growing fast, I optimized it good enough for this to work in real-time without a hitch.
There was some caching going on, thanks to the OutputCache directive in ASP.NET, but surprisingly enough there were no performance issues.
After Remoting
All right, so because I needed to display some extra information about ‘online’ users, that the Windows Service knew about, but the database didn’t, I decided to have a look at .NET Remoting. This was my first time working with it.
These were the issues I experienced (as a Remoting newbie) when rewriting the Windows Service to be accessible via .NET Remoting: (more…)
Bookmark on del.icio.us