You can easily generate Xml from a DataTable by using the .WriteXml() method. But you can also bypass this and retrieve the Xml directly SQL Server 2005 by running the following command: …
The “as” Keyword
Last week I ran into a problem with the 'as' keyword in C#. For those of you who dont know, the "as" keyword works like this: Lets say I have a variable and I'm certain its a string, but its in the …
New Lines
Lines are represented differently in different operating systems. For most non Unix Platforms the new line is represented as: "\r\n" And for Unix Platforms the new line is represented as: "\n" I've …
Escaping String Literals
I've been looking through a lot of "hand me down code" (code that was written awhile ago by someone else) that did a lot of File IO. The code works well, but at times its hard to read the really long …
Warnings as Errors
Warning: A: To give notice to beforehand especially of danger or evil B: To give admonishing adviceC: To call to one's attentionWith that said, we could infer that a warning is something that says …
Hiding Code From The Debugger
Sometimes there are methods in code that my development department knows are robust. There are no bugs in the code. This might be helper methods that have been tested time and time again. Therefore we …