Room for reference
September 03, 2005
  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. 
September 02, 2005
  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(
Uriuri1,
Uriuri2,
UriComponentspartsToCompare,
UriFormatcompareFormat,
StringComparisoncomparisonType
);

 
a blog on Technology of Microsoft & much more..

My Photo
Name:
Location: Chennai, Tamil Nadu, India
ARCHIVES
May 2004 / June 2004 / July 2004 / August 2004 / September 2004 / October 2004 / September 2005 /


Powered by Blogger