Exception handling in .NET
The better approach for exception management strategy in enterprise wide ASP.NET applications is:
a) Define a set of application-specific exception types.
b) Build a logging mechanism (Event log or activity logging in DB).
c) Trap the custom Application Exceptions in an HttpModule, log them and redirect the user to a custom error page that indicates some problem has occured.
Check out this MSDN Magazine article on Exception-handling techniques
for more understanding.
New Recommendations for Using Strings in Microsoft .NET 2.0
There is an article on MSDN, "New Recommendations for Using Strings in Microsoft .NET 2.0
", that explains the motivation behind Ordinal comparison and the new members of the System.StringComparison
enumeration in .NET 2.0. I admittedly glazed over, reading it the first time, but the third example in the section "The Motivation: The Turkish-I Problem" makes a world of sense... comparing InvariantCulture does not do a bit-wise comparison of the strings.
So, if you are comparing System.Uri's, do you compare using InvariantCulture (since the URI should be ASCII), or should you use Ordinal (given the guidance in "Choosing a StringComparison Member for Your Method Call" to use Ordinal for XML and HTTP)? The guidance from the owner of System.Uri indicated to just use Uri.Compare(). The prototype for Uri.Compare looks like:
public static int Compare(