Archives for the 'C#' Category
Snippet Compiler
This is one programming tool I wish I had discovered from the very beginning: Snippet Compiler. It allows you to test out C# code without having to fire up Visual Studio and laboriously create test console applications etc.
Although the latest version (3.0.2 for .NET 3.5) is an alpha, it seems very polished and I have […]
Bug in SgmlReader
Chris Lovett of Microsoft wrote SgmlReader 1.7 and has kindly shared it with the world. What does it do? In his own words:
An XmlReader implementation for loading SGML (including HTML) converting it to well formed XML, by adding missing quotes, empty attribute values, ignoring duplicate attributes, case folding on tag names, adding missing closing tags […]
C# Hidden Danger #2: GetHashCode()
Suppose you have an address book saved as a CSV text file or an XML file. You would like to create a program that loads the address book into memory, and return the contact details of a person, given the name.
There are a number of data structures from which to choose: array, ArrayList, List<T>, Hashtable, […]
C# Hidden Danger #1: The const Keyword
Declaring a constant with the const keyword makes it a compile-time constant. In the generated IL, all references to a compile-time constant will be replaced by its actual value. Now suppose that a compile-time constant is declared in one assembly and referenced in other assemblies. If the definition of the constant ever needs to be […]
My Take on Visual Studio 2008
I just finished five days of Visual Studio 2005 (.NET 2.0) training, with a day of Visual Studio 2008 (.NET 3.5) sprinkled on. My take on VS2008 are as follows:
First, AJAX integration is very tight. I have actually done AJAX the manual way before (with PHP) and I appreciate how much coding VS has […]
