-
Add Additional Information to Your Exceptions
When Enterprise Library was called Microsoft Application Blocks, if you wanted to log an Exception, you would write (assuming “ex” is an Exception): ExceptionManager.Publish(ex) And if you wanted to log some extended properties you could do something like this: NameValueCollection customerInfo = new NameValueCollection(); customerInfo.Add(“name”,”scott”); customerInfo.Add(“email”,”blah@blah.com”); ExceptionManager.Publish(ex,customerInfo); Now that I am upgrading all legacy code…
-
Fun with #region
I am not sure if I did this on accident, or my intern did it, but I found this in my code: #region Constructors//code here #endregion Constructors I was not aware you can put a tag after #endregion. Kind of nice to clearly delineate long regions. Not that it really matters, but Visual Studio allows…
-
Learning C# over VB.NET
-
Hiding a Row in ASP.NET
Many things that I come across are “No Duh”. This is one of them. I frequently see code from other programmers that incorrectly use Panel for the purpose of hiding content. What they don’t understand is that a Panel tag renders a table, and as such can’t be used around Table Rows. For instance, this:…
-
ReSharper Help and Tutorial
-
Binding a DropDownList to an Enumeration
-
String to Enum