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 …
ASP.NET File Name at Runtime
Retrieving the ASP.NET filename can be done in many ways. I've created this method in a few helper classes in some of the different jobs I have. public string GetCurrentPageFileName(){ …
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 …